Files
agessaman 75d4656e59 chore(variants): drop the dead MAX_MQTT_BROKERS build flag
Nothing has ever read it. The slot count comes from two other places: the
persisted array size (MAX_MQTT_SLOTS / RUNTIME_MQTT_SLOTS in MQTTPresets.h) and
the runtime cap MQTTBridge::getMaxActiveSlots(), which answers 5 with PSRAM and
2 without. A flag reading MAX_MQTT_BROKERS=3 sitting in every observer env
implies a third, lower limit that does not exist — it cost me a wrong answer
about how many MQTT slots a Heltec V4 exposes.

36 lines across 15 variants, all of them =3. Removing an unread -D cannot change
code: heltec_v4_repeater_observer_mqtt builds to a byte-identical size before and
after (1647744). The image checksum does differ, but so does it between two
clean builds of untouched source — ESP-IDF stamps the app descriptor with the
build time — so size is the meaningful comparison here.

All 606 envs still parse; heltec_v4, heltec_v3, station_g2, rak3112 and
xiao_s3_wio observer targets all build.
2026-08-08 08:28:18 -07:00

274 lines
7.9 KiB
INI

[ThinkNode_M7]
extends = esp32_base
board = thinknode_m7
board_upload.flash_size = 8MB
board_build.partitions = default_8MB.csv
build_flags = ${esp32_base.build_flags}
-I src/helpers/esp32
-I variants/thinknode_m7
-I src/helpers/sensors
-I src/helpers/ui
-D THINKNODE_M7
-D PIN_USER_BTN_ANA=4
-D PIN_STATUS_LED=3 ; green
-D LED_STATE_ON=LOW
-D RADIO_CLASS=CustomLR1110
-D WRAPPER_CLASS=CustomLR1110Wrapper
-D USE_LR1110
-D LORA_TX_POWER=22
-D RF_SWITCH_TABLE
-D RX_BOOSTED_GAIN=true
-D P_LORA_BUSY=13
-D P_LORA_SCLK=11
-D P_LORA_NSS=12
-D P_LORA_DIO_1=38
-D P_LORA_MISO=9
-D P_LORA_MOSI=10
-D P_LORA_RESET=39
-D P_LORA_TX_LED=46 ; blue
-D LR11X0_DIO_AS_RF_SWITCH=true
-D LR11X0_DIO3_TCXO_VOLTAGE=1.8
; No blanket +<helpers/*.cpp> here: it would undo arduino_base's exclusion of the
; MQTT-only sources, which need Timezone/NTPClient that only observer envs pull in.
build_src_filter = ${esp32_base.build_src_filter}
+<helpers/sensors/EnvironmentSensorManager.cpp>
+<helpers/ui/MomentaryButton.cpp>
+<../variants/thinknode_m7>
lib_deps = ${esp32_base.lib_deps}
stevemarple/MicroNMEA @ ^2.0.6
[ThinkNode_M7_ethernet]
build_flags =
-D ETHERNET_ENABLED
-D ETHERNET_USE_CH390
-D ETHERNET_CLASS=CH390EthernetInterface
-D ETH_MISO_PIN=14
-D ETH_MOSI_PIN=48
-D ETH_SCLK_PIN=47
-D ETH_CS_PIN=21
-D ETH_INT_PIN=45
-D ETHERNET_DEBUG_LOGGING=1
build_src_filter =
+<helpers/ethernet/*.cpp>
+<helpers/ethernet/ch390/>
lib_deps =
https://github.com/liamcottle/ESP32-CH390.git#47b401f1de546118b03c18b5689dedec45871f2d
[env:ThinkNode_M7_repeater]
extends = ThinkNode_M7
build_src_filter = ${ThinkNode_M7.build_src_filter}
+<../examples/simple_repeater/*.cpp>
build_flags =
${ThinkNode_M7.build_flags}
-D ADVERT_NAME='"ThinkNode M7 Repeater"'
-D ADVERT_LAT=0.0
-D ADVERT_LON=0.0
-D ADMIN_PASSWORD='"password"'
-D MAX_NEIGHBOURS=50
; -D MESH_PACKET_LOGGING=1
; -D MESH_DEBUG=1
lib_deps =
${ThinkNode_M7.lib_deps}
${esp32_ota.lib_deps}
[env:ThinkNode_M7_room_server]
extends = ThinkNode_M7
build_src_filter = ${ThinkNode_M7.build_src_filter}
+<../examples/simple_room_server>
build_flags =
${ThinkNode_M7.build_flags}
-D ADVERT_NAME='"ThinkNode M7 Room Server"'
-D ADVERT_LAT=0.0
-D ADVERT_LON=0.0
-D ADMIN_PASSWORD='"password"'
-D ROOM_PASSWORD='"hello"'
; -D MESH_PACKET_LOGGING=1
; -D MESH_DEBUG=1
lib_deps =
${ThinkNode_M7.lib_deps}
${esp32_ota.lib_deps}
[env:ThinkNode_M7_companion_radio_ble]
extends = ThinkNode_M7
build_flags =
${ThinkNode_M7.build_flags}
${ThinkNode_M7_ethernet.build_flags}
-I examples/companion_radio/ui-orig
-D DISPLAY_CLASS=NullDisplayDriver
-D MAX_CONTACTS=350
-D MAX_GROUP_CHANNELS=40
-D BLE_PIN_CODE=123456
-D OFFLINE_QUEUE_SIZE=256
; -D BLE_DEBUG_LOGGING=1
; -D MESH_PACKET_LOGGING=1
build_src_filter = ${ThinkNode_M7.build_src_filter}
${ThinkNode_M7_ethernet.build_src_filter}
+<helpers/esp32/*.cpp>
+<helpers/ui/MomentaryButton.cpp>
+<helpers/ui/NullDisplayDriver.cpp>
+<../examples/companion_radio/*.cpp>
+<../examples/companion_radio/ui-orig/*.cpp>
lib_deps =
${ThinkNode_M7.lib_deps}
${ThinkNode_M7_ethernet.lib_deps}
densaugeo/base64 @ ~1.4.0
[env:ThinkNode_M7_companion_radio_usb]
extends = ThinkNode_M7
build_flags =
${ThinkNode_M7.build_flags}
-I examples/companion_radio/ui-orig
-D MAX_CONTACTS=350
-D MAX_GROUP_CHANNELS=40
-D OFFLINE_QUEUE_SIZE=256
-D ENABLE_USB_INTERFACE
build_src_filter = ${ThinkNode_M7.build_src_filter}
+<helpers/esp32/*.cpp>
+<helpers/ui/MomentaryButton.cpp>
+<../examples/companion_radio/*.cpp>
+<../examples/companion_radio/ui-orig/*.cpp>
lib_deps =
${ThinkNode_M7.lib_deps}
densaugeo/base64 @ ~1.4.0
[env:ThinkNode_M7_companion_radio_wifi]
extends = ThinkNode_M7
build_flags =
${ThinkNode_M7.build_flags}
-I examples/companion_radio/ui-orig
-D MAX_CONTACTS=350
-D MAX_GROUP_CHANNELS=40
-D DISPLAY_CLASS=NullDisplayDriver
-D WIFI_DEBUG_LOGGING=1
-D WIFI_SSID='"myssid"'
-D WIFI_PWD='"mypwd"'
-D OFFLINE_QUEUE_SIZE=256
; -D MESH_PACKET_LOGGING=1
build_src_filter = ${ThinkNode_M7.build_src_filter}
+<helpers/esp32/*.cpp>
+<helpers/ui/MomentaryButton.cpp>
+<helpers/ui/NullDisplayDriver.cpp>
+<../examples/companion_radio/*.cpp>
+<../examples/companion_radio/ui-orig/*.cpp>
lib_deps =
${ThinkNode_M7.lib_deps}
densaugeo/base64 @ ~1.4.0
[env:ThinkNode_M7_companion_radio_ethernet]
extends = ThinkNode_M7
build_flags =
${ThinkNode_M7.build_flags}
${ThinkNode_M7_ethernet.build_flags}
-I examples/companion_radio/ui-orig
-D MAX_CONTACTS=350
-D MAX_GROUP_CHANNELS=40
-D DISPLAY_CLASS=NullDisplayDriver
-D OFFLINE_QUEUE_SIZE=256
build_src_filter = ${ThinkNode_M7.build_src_filter}
${ThinkNode_M7_ethernet.build_src_filter}
+<helpers/esp32/*.cpp>
+<helpers/ui/MomentaryButton.cpp>
+<helpers/ui/NullDisplayDriver.cpp> ; defines UIColor::window_bkg for DISPLAY_CLASS
+<../examples/companion_radio/*.cpp>
+<../examples/companion_radio/ui-orig/*.cpp>
lib_deps = ${ThinkNode_M7.lib_deps}
${ThinkNode_M7_ethernet.lib_deps}
densaugeo/base64 @ ~1.4.0
[env:ThinkNode_M7_kiss_modem]
extends = ThinkNode_M7
build_src_filter = ${ThinkNode_M7.build_src_filter}
+<../examples/kiss_modem/>
; MQTT observer envs are WiFi-only: the bridge's link management is bound to the
; WiFi station API, so the onboard CH390 cannot carry MQTT yet. The board has
; PSRAM, so MAX_NEIGHBOURS enables WITH_MQTT_NEIGHBORS (see MQTTBridge.h).
[env:ThinkNode_M7_repeater_observer_mqtt]
extends = ThinkNode_M7
extra_scripts =
${esp32_base.extra_scripts}
pre:scripts/generate_cert_bundle.py
board_ssl_cert_source = adafruit-full
board_build.embed_files = src/certs/x509_crt_bundle.bin
build_flags =
${ThinkNode_M7.build_flags}
-D ADVERT_NAME='"MQTT Observer"'
-D ADVERT_LAT=0.0
-D ADVERT_LON=0.0
-D ADMIN_PASSWORD='"password"'
-D MAX_NEIGHBOURS=50
-D WITH_MQTT_BRIDGE=1
-D MQTT_MAX_PACKET_SIZE=1024
-D MQTT_DEBUG=1
# -D MESH_PACKET_LOGGING=1
# -D MESH_DEBUG=1
-D CONFIG_MBEDTLS_CERTIFICATE_BUNDLE=y
-D ESP32_CPU_FREQ=160
-D WITH_SNMP=1
# -D WIFI_SSID='"ssid"'
# -D WIFI_PWD='"password"'
# -D MQTT_SERVER='"your-mqtt-broker.com"'
# -D MQTT_PORT=1883
# -D MQTT_USERNAME='"your-username"'
# -D MQTT_PASSWORD='"your-password"'
build_src_filter = ${ThinkNode_M7.build_src_filter}
+<helpers/bridges/MQTTBridge.cpp>
+<helpers/MQTTMessageBuilder.cpp>
+<helpers/JWTHelper.cpp>
+<helpers/SNMPAgent.cpp>
+<../examples/simple_repeater>
lib_deps =
${ThinkNode_M7.lib_deps}
${esp32_ota.lib_deps}
elims/PsychicMqttClient@^0.2.4
bblanchon/ArduinoJson @ 7.4.3
arduino-libraries/NTPClient
JChristensen/Timezone
paulstoffregen/Time@1.6.1
0neblock/SNMP_Agent
[env:ThinkNode_M7_room_server_observer_mqtt]
extends = ThinkNode_M7
extra_scripts =
${esp32_base.extra_scripts}
pre:scripts/generate_cert_bundle.py
board_ssl_cert_source = adafruit-full
board_build.embed_files = src/certs/x509_crt_bundle.bin
build_flags =
${ThinkNode_M7.build_flags}
-D ADVERT_NAME='"ThinkNode M7 Room Observer"'
-D ADVERT_LAT=0.0
-D ADVERT_LON=0.0
-D ADMIN_PASSWORD='"password"'
-D ROOM_PASSWORD='"hello"'
-D MAX_NEIGHBOURS=50
-D WITH_MQTT_BRIDGE=1
-D MQTT_MAX_PACKET_SIZE=1024
-D MQTT_DEBUG=1
# -D MESH_PACKET_LOGGING=1
# -D MESH_DEBUG=1
-D CONFIG_MBEDTLS_CERTIFICATE_BUNDLE=y
-D ESP32_CPU_FREQ=160
-D WITH_SNMP=1
# -D WIFI_SSID='"ssid"'
# -D WIFI_PWD='"password"'
# -D MQTT_SERVER='"your-mqtt-broker.com"'
# -D MQTT_PORT=1883
# -D MQTT_USERNAME='"your-username"'
# -D MQTT_PASSWORD='"your-password"'
build_src_filter = ${ThinkNode_M7.build_src_filter}
+<helpers/bridges/MQTTBridge.cpp>
+<helpers/MQTTMessageBuilder.cpp>
+<helpers/JWTHelper.cpp>
+<helpers/SNMPAgent.cpp>
+<../examples/simple_room_server>
lib_deps =
${ThinkNode_M7.lib_deps}
${esp32_ota.lib_deps}
elims/PsychicMqttClient@^0.2.4
bblanchon/ArduinoJson @ 7.4.3
arduino-libraries/NTPClient
JChristensen/Timezone
paulstoffregen/Time@1.6.1
0neblock/SNMP_Agent