Added support for MeshCoreTel broker.

Этот коммит содержится в:
Valentin V. Bartenev
2026-04-27 03:15:00 +03:00
родитель 41a29975a4
Коммит f1912ff184
6 изменённых файлов: 216 добавлений и 46 удалений
+8
Просмотреть файл
@@ -2308,6 +2308,8 @@ void MyMesh::handleCommand(uint32_t sender_timestamp, char *command, char *reply
sprintf(reply, "> %s", mqtt.isEndpointEnabled(0x02) ? "on" : "off");
} else if (memcmp(command, "get mqtt.letsmesh-us", 21) == 0 || memcmp(command, "get mqtt.letsmesh.us", 21) == 0) {
sprintf(reply, "> %s", mqtt.isEndpointEnabled(0x04) ? "on" : "off");
} else if (memcmp(command, "get mqtt.meshcoretel", 20) == 0) {
sprintf(reply, "> %s", mqtt.isEndpointEnabled(0x08) ? "on" : "off");
} else if (memcmp(command, "set mqtt.tx ", 12) == 0) {
mqtt.setTxEnabled(memcmp(&command[12], "on", 2) == 0);
strcpy(reply, "OK");
@@ -2356,6 +2358,12 @@ void MyMesh::handleCommand(uint32_t sender_timestamp, char *command, char *reply
} else {
strcpy(reply, "Err - max 2 mqtt brokers");
}
} else if (memcmp(command, "set mqtt.meshcoretel ", 21) == 0) {
if (mqtt.setEndpointEnabled(0x08, memcmp(&command[21], "on", 2) == 0)) {
strcpy(reply, "OK");
} else {
strcpy(reply, "Err - max 2 mqtt brokers");
}
#endif
} else{
_cli.handleCommand(sender_timestamp, command, reply); // common CLI commands