Merge upstream/dev (6 commits) [upstream-sync]
This commit is contained in:
commit
bb0fb8c05c
6 files changed
+39
-9
No files matched your search
@@ -546,21 +546,26 @@ void SensorMesh::handleCommand(ClientInfo* from, uint32_t sender_timestamp, char
|
||||
Serial.printf("\n");
|
||||
}
|
||||
reply[0] = 0;
|
||||
} else if (memcmp(command, "io ", 2) == 0) { // io {value}: write, io: read
|
||||
} else if (strcmp(command, "io") == 0 || memcmp(command, "io ", 3) == 0) { // io {value}: write, io: read
|
||||
if (command[2] == ' ') { // it's a write
|
||||
uint32_t val;
|
||||
uint32_t val = 0;
|
||||
uint32_t g = board.getGpio();
|
||||
bool ok;
|
||||
if (command[3] == 'r') { // reset bits
|
||||
sscanf(&command[4], "%x", &val);
|
||||
val = g & ~val;
|
||||
ok = sscanf(&command[4], "%x", &val) == 1;
|
||||
val = g & ~val;
|
||||
} else if (command[3] == 's') { // set bits
|
||||
sscanf(&command[4], "%x", &val);
|
||||
val |= g;
|
||||
ok = sscanf(&command[4], "%x", &val) == 1;
|
||||
val |= g;
|
||||
} else if (command[3] == 't') { // toggle bits
|
||||
sscanf(&command[4], "%x", &val);
|
||||
val ^= g;
|
||||
ok = sscanf(&command[4], "%x", &val) == 1;
|
||||
val ^= g;
|
||||
} else { // set value
|
||||
sscanf(&command[3], "%x", &val);
|
||||
ok = sscanf(&command[3], "%x", &val) == 1;
|
||||
}
|
||||
if (!ok) {
|
||||
strcpy(reply, "Err - bad params");
|
||||
return;
|
||||
}
|
||||
board.setGpio(val);
|
||||
}
|
||||
|
||||
@@ -113,6 +113,7 @@ build_flags =
|
||||
extends = Heltec_t096
|
||||
build_flags =
|
||||
${Heltec_t096.build_flags}
|
||||
-I src/helpers/ui/server
|
||||
-D ADVERT_NAME='"Heltec_t096 Sensor"'
|
||||
-D ADVERT_LAT=0.0
|
||||
-D ADVERT_LON=0.0
|
||||
@@ -122,6 +123,7 @@ build_flags =
|
||||
; -D MESH_PACKET_LOGGING=1
|
||||
; -D MESH_DEBUG=1
|
||||
build_src_filter = ${Heltec_t096.build_src_filter}
|
||||
+<helpers/ui/server>
|
||||
+<../examples/simple_sensor>
|
||||
lib_deps =
|
||||
${Heltec_t096.lib_deps}
|
||||
|
||||
@@ -124,6 +124,7 @@ lib_deps =
|
||||
extends = rak3401
|
||||
build_flags =
|
||||
${rak3401.build_flags}
|
||||
-I src/helpers/ui/server
|
||||
-D DISPLAY_CLASS=SSD1306Display
|
||||
-D ADVERT_NAME='"RAK3401 Sensor"'
|
||||
-D ADVERT_LAT=0.0
|
||||
@@ -132,6 +133,7 @@ build_flags =
|
||||
;-D MESH_PACKET_LOGGING=1
|
||||
;-D MESH_DEBUG=1
|
||||
build_src_filter = ${rak3401.build_src_filter}
|
||||
+<helpers/ui/server>
|
||||
+<helpers/ui/SSD1306Display.cpp>
|
||||
+<../examples/simple_sensor>
|
||||
|
||||
|
||||
@@ -275,6 +275,7 @@ lib_deps =
|
||||
extends = rak4631
|
||||
build_flags =
|
||||
${rak4631.build_flags}
|
||||
-I src/helpers/ui/server
|
||||
-D DISPLAY_CLASS=AutoDetectDisplay
|
||||
-D ADVERT_NAME='"RAK4631 Sensor"'
|
||||
-D ADVERT_LAT=0.0
|
||||
@@ -283,6 +284,7 @@ build_flags =
|
||||
; -D MESH_PACKET_LOGGING=1
|
||||
; -D MESH_DEBUG=1
|
||||
build_src_filter = ${rak4631.build_src_filter}
|
||||
+<helpers/ui/server>
|
||||
+<helpers/ui/SSD1306Display.cpp>
|
||||
+<../examples/simple_sensor>
|
||||
|
||||
|
||||
@@ -129,3 +129,17 @@ build_src_filter = ${t1000-e.build_src_filter}
|
||||
+<../examples/kiss_modem/>
|
||||
lib_deps = ${t1000-e.lib_deps}
|
||||
stevemarple/MicroNMEA @ ^2.0.6
|
||||
|
||||
[env:t1000e_sensor]
|
||||
extends = t1000-e
|
||||
build_flags = ${t1000-e.build_flags}
|
||||
-D ADVERT_NAME='"t1000-e sensor"'
|
||||
-D ADVERT_LAT=0.0
|
||||
-D ADVERT_LON=0.0
|
||||
-D ADMIN_PASSWORD='"password"'
|
||||
; -D MESH_PACKET_LOGGING=1
|
||||
; -D MESH_DEBUG=1
|
||||
build_src_filter = ${t1000-e.build_src_filter}
|
||||
+<../examples/simple_sensor/>
|
||||
lib_deps = ${t1000-e.lib_deps}
|
||||
stevemarple/MicroNMEA @ ^2.0.6
|
||||
@@ -50,6 +50,7 @@ build_src_filter = ${esp32_base.build_src_filter}
|
||||
+<helpers/ui/ST7789Display.cpp>
|
||||
+<helpers/ui/OLEDDisplay.cpp>
|
||||
+<helpers/ui/OLEDDisplayFonts.cpp>
|
||||
+<helpers/ui/BaseUITask.cpp>
|
||||
+<helpers/*.cpp>
|
||||
+<../variants/thinknode_m9>
|
||||
lib_deps = ${esp32_base.lib_deps}
|
||||
@@ -60,6 +61,7 @@ lib_deps = ${esp32_base.lib_deps}
|
||||
extends = ThinkNode_M9
|
||||
build_flags =
|
||||
${ThinkNode_M9.build_flags}
|
||||
-I src/helpers/ui/server
|
||||
-D ADVERT_NAME='"ThinkNode M9 Repeater"'
|
||||
-D ADVERT_LAT=0.0
|
||||
-D ADVERT_LON=0.0
|
||||
@@ -68,6 +70,7 @@ build_flags =
|
||||
;-D MESH_PACKET_LOGGING=1
|
||||
;-D MESH_DEBUG=1
|
||||
build_src_filter = ${ThinkNode_M9.build_src_filter}
|
||||
+<helpers/ui/server>
|
||||
+<../examples/simple_repeater/*.cpp>
|
||||
lib_deps =
|
||||
${ThinkNode_M9.lib_deps}
|
||||
@@ -76,9 +79,11 @@ lib_deps =
|
||||
[env:ThinkNode_M9_room_server_]
|
||||
extends = ThinkNode_M9
|
||||
build_src_filter = ${ThinkNode_M9.build_src_filter}
|
||||
+<helpers/ui/server>
|
||||
+<../examples/simple_room_server>
|
||||
build_flags =
|
||||
${ThinkNode_M9.build_flags}
|
||||
-I src/helpers/ui/server
|
||||
-D ADVERT_NAME='"ThinkNode M9 Room Server"'
|
||||
-D ADVERT_LAT=0.0
|
||||
-D ADVERT_LON=0.0
|
||||
|
||||
Reference in new issue
Block a user