fix: harden CLI and GPS handling
This commit is contained in:
1 parent
b1f8945e1c
commit
74002db4e5
9 files changed
+192
-94
No files matched your search
@@ -784,6 +784,7 @@ void SensorMesh::onPeerDataRecv(mesh::Packet* packet, uint8_t type, int sender_i
|
||||
uint8_t temp[166];
|
||||
char *command = (char *) &data[5];
|
||||
char *reply = (char *) &temp[5];
|
||||
*reply = 0;
|
||||
handleCommand(sender_timestamp, command, reply, i,
|
||||
packet->getPathHashSize());
|
||||
|
||||
|
||||
@@ -165,6 +165,7 @@ void loop() {
|
||||
if (len > 0 && command[len - 1] == '\r') { // received complete line
|
||||
command[len - 1] = 0; // replace newline with C string null terminator
|
||||
char reply[160];
|
||||
reply[0] = 0;
|
||||
the_mesh.handleCommand(0, command, reply); // NOTE: there is no sender_timestamp via serial!
|
||||
if (reply[0]) {
|
||||
Serial.print(" -> "); Serial.println(reply);
|
||||
|
||||
Reference in new issue
Block a user