This commit is contained in:
Michael Gjelsø 2024-11-11 13:22:20 +01:00 committed by Tom Fifield
parent 443705b80b
commit a53338156a

View File

@ -122,7 +122,7 @@ void DetectionSensorModule::sendDetectionMessage()
char *message = new char[40];
sprintf(message, "%s detected", moduleConfig.detection_sensor.name);
meshtastic_MeshPacket *p = allocDataPacket();
p->to = nodeDB->getNodeNum(); //set destination to self or it would go to 0xffffffff
p->to = nodeDB->getNodeNum(); // set destination to self or it would go to 0xffffffff
p->want_ack = false;
p->decoded.payload.size = strlen(message);
memcpy(p->decoded.payload.bytes, message, p->decoded.payload.size);
@ -142,7 +142,7 @@ void DetectionSensorModule::sendCurrentStateMessage(bool state)
char *message = new char[40];
sprintf(message, "%s state: %i", moduleConfig.detection_sensor.name, state);
meshtastic_MeshPacket *p = allocDataPacket();
p->to = nodeDB->getNodeNum(); //set destination to self or it would go to 0xffffffff
p->to = nodeDB->getNodeNum(); // set destination to self or it would go to 0xffffffff
p->want_ack = false;
p->decoded.payload.size = strlen(message);
memcpy(p->decoded.payload.bytes, message, p->decoded.payload.size);