
solución del primer corte
Revision 4:66f0a55f249d, committed 2018-09-07
- Comitter:
- fabeltranm
- Date:
- Fri Sep 07 12:38:06 2018 +0000
- Parent:
- 3:6fff0b259d65
- Commit message:
- ok
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Fri Sep 07 12:27:33 2018 +0000 +++ b/main.cpp Fri Sep 07 12:38:06 2018 +0000 @@ -28,7 +28,8 @@ while(read_command()==0); switch (dat[TIPO_COMM]) { case 0x01: moving(); break; - default: debug_m("error de comando. ");break ; + default: debug_m("prueba comando. "); + break ; } } } @@ -46,13 +47,15 @@ while(intc != '<') intc=command.getc(); - for (int i =0;i>MAXDAT;i++) + for (int i =0;i<MAXDAT;i++) dat[i]=command.getc(); intc=command.getc(); - while(intc != '>') + if(intc != '>'){ + debug_m("error de comando no se recibe bien ..\n"); return 0; + } return 1; }