]> git.tnoah.ca Git - lora-radio.git/commitdiff
Cleanup
authorMark Qvist <mark@unsigned.io>
Sat, 12 Apr 2025 18:59:00 +0000 (20:59 +0200)
committerMark Qvist <mark@unsigned.io>
Sat, 12 Apr 2025 18:59:00 +0000 (20:59 +0200)
Display.h
Framing.h
Makefile
esp32_btbufs.py

index 58b96c5f4e7ba06982c18f47a62c336c34b875c1..7062e0d14c78e5d3ae56917195d13ab701300d91 100644 (file)
--- a/Display.h
+++ b/Display.h
@@ -655,7 +655,7 @@ void draw_waterfall(int px, int py) {
   if (rssi_val > WF_RSSI_MAX) rssi_val = WF_RSSI_MAX;
   int rssi_normalised = ((rssi_val - WF_RSSI_MIN)*(1.0/WF_RSSI_SPAN))*WF_PIXEL_WIDTH;
   if (display_tx) {
-    for (uint8_t i; i < WF_TX_SIZE; i++) {
+    for (uint8_t i = 0; i < WF_TX_SIZE; i++) {
       waterfall[waterfall_head++] = -1;
       if (waterfall_head >= WATERFALL_SIZE) waterfall_head = 0;
     }
index 89e103971b7624506863ca1512eaeb3c365d6ed3..6dffb98ac8f0b97844ced416c15c128959283507 100644 (file)
--- a/Framing.h
+++ b/Framing.h
   #define CMD_RESET       0x55
   #define CMD_RESET_BYTE  0xF8
 
+  #define CMD_LOG         0x70
+  #define CMD_TIME        0x70
+  #define CMD_MUX_CHAIN   0x80
+  #define CMD_MUX_DSCVR   0x81
+
   #define DETECT_REQ      0x73
   #define DETECT_RESP     0x46
 
index 2a244acf0d3170c4d29150084482a98bef61fa7b..13bd23b77e20e23026c5799efae3a42b267d7140 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -192,11 +192,11 @@ upload-heltec32_v2:
        python ./Release/esptool/esptool.py --chip esp32 --port /dev/ttyUSB1 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size 4MB 0x210000 ./Release/console_image.bin
 
 upload-heltec32_v3:
-       arduino-cli upload -p /dev/ttyUSB1 --fqbn esp32:esp32:heltec_wifi_lora_32_V3
+       arduino-cli upload -p /dev/ttyUSB0 --fqbn esp32:esp32:heltec_wifi_lora_32_V3
        @sleep 1
-       rnodeconf /dev/ttyUSB1 --firmware-hash $$(./partition_hashes ./build/esp32.esp32.heltec_wifi_lora_32_V3/RNode_Firmware.ino.bin)
+       rnodeconf /dev/ttyUSB0 --firmware-hash $$(./partition_hashes ./build/esp32.esp32.heltec_wifi_lora_32_V3/RNode_Firmware.ino.bin)
        @sleep 3
-       python ./Release/esptool/esptool.py --chip esp32-s3 --port /dev/ttyUSB1 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size 4MB 0x210000 ./Release/console_image.bin
+       python ./Release/esptool/esptool.py --chip esp32-s3 --port /dev/ttyUSB0 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size 4MB 0x210000 ./Release/console_image.bin
 
 upload-tdeck:
        arduino-cli upload -p /dev/ttyACM0 --fqbn esp32:esp32:esp32s3
@@ -357,7 +357,7 @@ release-heltec32_v2: check_bt_buffers
        zip --junk-paths ./Release/rnode_firmware_heltec32v2.zip ./Release/esptool/esptool.py ./Release/console_image.bin build/rnode_firmware_heltec32v2.boot_app0 build/rnode_firmware_heltec32v2.bin build/rnode_firmware_heltec32v2.bootloader build/rnode_firmware_heltec32v2.partitions
        rm -r build
 
-release-heltec32_v3:
+release-heltec32_v3: check_bt_buffers
        arduino-cli compile --fqbn esp32:esp32:heltec_wifi_lora_32_V3 -e --build-property "build.partitions=no_ota" --build-property "upload.maximum_size=2097152" --build-property "compiler.cpp.extra_flags=\"-DBOARD_MODEL=0x3A\""
        cp ~/.arduino15/packages/esp32/hardware/esp32/$(ARDUINO_ESP_CORE_VER)/tools/partitions/boot_app0.bin build/rnode_firmware_heltec32v3.boot_app0
        cp build/esp32.esp32.heltec_wifi_lora_32_V3/RNode_Firmware.ino.bin build/rnode_firmware_heltec32v3.bin
index 8a5b15eea529d260405094a1c683d92e83fb0413..ad0ae70baeaae45c832059e500afe57d5996cbf6 100755 (executable)
@@ -1,5 +1,6 @@
 #!/usr/bin/env python3
 import sys
+import re
 
 try:
     target_path = sys.argv[1]
@@ -12,7 +13,7 @@ try:
         for line in sf:
             line_index += 1
             if line.startswith("#define RX_QUEUE_SIZE"):
-                ents = line.split(" ")
+                ents = re.sub(" +", " ", line).split(" ")
                 try:
                     rxbuf_size = int(ents[2])
                     rx_line_index = line_index
@@ -20,12 +21,12 @@ try:
                     print(f"Could not parse Bluetooth RX_QUEUE_SIZE: {e}")
 
             if line.startswith("#define TX_QUEUE_SIZE"):
-                ents = line.split(" ")
+                ents = re.sub(" +", " ", line).split(" ")
                 try:
                     txbuf_size = int(ents[2])
                     tx_line_index = line_index
                 except Exception as e:
-                    print(f"Could not parse Bluetooth RX_QUEUE_SIZE: {e}")
+                    print(f"Could not parse Bluetooth TX_QUEUE_SIZE: {e}")
 
             if rxbuf_size != 0 and txbuf_size != 0:
                 break