![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
pausa
Fork of primercorte by
Revision 5:9187685429b3, committed 2018-06-06
- Comitter:
- nicolasrojas
- Date:
- Wed Jun 06 18:31:04 2018 +0000
- Parent:
- 4:244a242e0428
- Commit message:
- pausa
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 244a242e0428 -r 9187685429b3 main.cpp --- a/main.cpp Wed Jun 06 18:02:21 2018 +0000 +++ b/main.cpp Wed Jun 06 18:31:04 2018 +0000 @@ -91,9 +91,15 @@ int y = (uint8_t)(dato); int x = (uint8_t)(dato>>8); char ncomm = (uint8_t)(dato>>16); - + if (ncomm== CM_PAUSA){ + debug_m("-> dibujo en pausa\n"); + pausa() + - if (ncomm == CM_VERTEX2D) { + + } + + else if (ncomm == CM_VERTEX2D) { debug_m("-> Mover piccolo x a %d y y a %d \n",x,x, y); vertex2d(x,y); @@ -102,11 +108,8 @@ smotor1.step(x*4096,(bool) y); } - else if(ncomn == CM_PAUSA) { - debug_m("didujo en pausa\n"); - pause(); + - } debug_m("-> ERROR DE COMMANDO: %d %d %d \n " ,ncomm,x,y,y); @@ -139,7 +142,7 @@ -void pause(){ +void pausa(){ char d=command.getc(); if(d==CM_PAUSA){ @@ -147,7 +150,7 @@ command.attach(0,Serial::RxIrq); debug_m("interrumpe\n"); while(command.getc()!=CM_PLAY){} - command.attach(&pause,Serial::RxIrq); + command.attach(&pausa,Serial::RxIrq); return;} }