Teste Flash
Dependencies: pulga-lorawan-drv Si1133 BME280
Diff: serial_cmds.cpp
- Revision:
- 69:2d56b571c78e
- Parent:
- 68:fc357095c8ef
diff -r fc357095c8ef -r 2d56b571c78e serial_cmds.cpp --- a/serial_cmds.cpp Fri Mar 26 13:43:43 2021 +0000 +++ b/serial_cmds.cpp Tue Jun 01 20:19:52 2021 +0000 @@ -11,12 +11,9 @@ case CMD_PRINT_LAST_GPS: {int local_lat, local_log; - //gps_get_lat_lon(&local_lat, &local_log); - //get_latitude - //pc.printf("<g%d,%d\n>", get_latitude(), get_longitude()); + gps_data = get_struct(); - pc.printf("<g%d,%d\n>", (int)gps_data.lat, (int)gps_data.lon); - + pc.printf("<g%d,%d\n>", (int)gps_data.lat, (int)gps_data.lon); pc.printf("<t%d/%d/%d-%d:%d:%d\n>", (int)gps_data.year, (int)gps_data.month,(int)gps_data.day, (int)gps_data.hour, (int)gps_data.min, (int)gps_data.sec); break;} @@ -39,7 +36,7 @@ } break;} case CMD_SEND_LORAWAN_NO_RETRANS: - {pc.printf("<w %s>", msg[+2]); + {pc.printf("<w %s>", msg+2); char msg_lora [256]; strncpy(msg_lora, msg+2, strlen(msg)); //original string, begin index (2), substring length int ret1; @@ -58,7 +55,7 @@ break;} case CMD_SEND_LORAWAN_RETRANS: - {pc.printf("<w %s>", msg[+2]); + {pc.printf("<w %s>", msg+2); char msg_lora_retrans [256]; strncpy(msg_lora_retrans, msg+2, strlen(msg)); //original string, begin index (2), substring length int ret2;