
Codigo donde falta la comunicacion serial
Diff: main.cpp
- Revision:
- 4:66f0a55f249d
- Parent:
- 3:6fff0b259d65
--- 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; }