diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 5c5735c6..b07714d9 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -6,6 +6,7 @@ "platformio.platformio-ide" ], "unwantedRecommendations": [ - "ms-vscode.cpptools-extension-pack" + "ms-vscode.cpptools-extension-pack", + "pioarduino.pioarduino-ide" ] } diff --git a/variants/meshadventurer/platformio.ini b/variants/meshadventurer/platformio.ini index 0b33196c..a950a0ec 100644 --- a/variants/meshadventurer/platformio.ini +++ b/variants/meshadventurer/platformio.ini @@ -355,6 +355,116 @@ build_flags = ${Meshadventurer.build_flags} -D WRAPPER_CLASS=CustomSX1268Wrapper -D LORA_TX_POWER=22 +[env:Meshadventurer_e22p_433m30s_companion_radio_ble] +extends = Meshadventurer +build_src_filter = ${Meshadventurer.build_src_filter} + + + +<../examples/companion_radio/*.cpp> + +<../examples/companion_radio/ui-new/*.cpp> +build_flags = + ${Meshadventurer.build_flags} + -I examples/companion_radio/ui-new + -D RADIO_CLASS=CustomSX1268 + -D WRAPPER_CLASS=CustomSX1268Wrapper + -D LORA_TX_POWER=22 + -D MAX_CONTACTS=160 + -D MAX_GROUP_CHANNELS=40 + -D BLE_PIN_CODE=123456 + -D BLE_DEBUG_LOGGING=1 + -D OFFLINE_QUEUE_SIZE=128 + -D TCXO_OPTIONAL=1 + -D LORA_FREQ=433.0 + -D SX126X_RXEN=RADIOLIB_NC + -D SX126X_TXEN=RADIOLIB_NC + -D P_LORA_EN=14 + -D SX126X_DIO2_AS_RF_SWITCH=1 +; -D MESH_PACKET_LOGGING=1 + -D MESH_DEBUG=1 +lib_deps = + ${Meshadventurer.lib_deps} + densaugeo/base64 @ ~1.4.0 + +[env:Meshadventurer_sx1262_e22p_433m30s_companion_radio_usb] +extends = Meshadventurer +build_src_filter = ${Meshadventurer.build_src_filter} + +<../examples/companion_radio/*.cpp> + +<../examples/companion_radio/ui-new/*.cpp> +build_flags = + ${Meshadventurer.build_flags} + -I examples/companion_radio/ui-new + -D RADIO_CLASS=CustomSX1262 + -D WRAPPER_CLASS=CustomSX1262Wrapper + -D SX126X_RXEN=RADIOLIB_NC + -D SX126X_TXEN=RADIOLIB_NC + -D P_LORA_EN=14 + -D SX126X_DIO2_AS_RF_SWITCH=1 + -D LORA_FREQ=433.0 + -D LORA_TX_POWER=12 + -D MAX_CONTACTS=160 + -D MAX_GROUP_CHANNELS=40 + -D OFFLINE_QUEUE_SIZE=128 + -D ENABLE_USB_INTERFACE +; -D MESH_PACKET_LOGGING=1 +; -D MESH_DEBUG=1 +lib_deps = + ${Meshadventurer.lib_deps} + densaugeo/base64 @ ~1.4.0 + +[env:Meshadventurer_sx1262_e22p_433m30s_repeater] +extends = Meshadventurer +build_src_filter = ${Meshadventurer.build_src_filter} + +<../examples/simple_repeater> +build_flags = + ${Meshadventurer.build_flags} + -D RADIO_CLASS=CustomSX1262 + -D WRAPPER_CLASS=CustomSX1262Wrapper + -D SX126X_RXEN=RADIOLIB_NC + -D SX126X_TXEN=RADIOLIB_NC + -D P_LORA_EN=14 + -D SX126X_DIO2_AS_RF_SWITCH=1 + -D LORA_FREQ=433.0 + -D LORA_TX_POWER=12 + -D ADVERT_NAME='"Meshadventurer 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 = + ${Meshadventurer.lib_deps} + ${esp32_ota.lib_deps} + +[env:Meshadventurer_sx1262_e22p_433m30s_repeater_bridge_espnow] +extends = Meshadventurer +build_src_filter = ${Meshadventurer.build_src_filter} + + + +<../examples/simple_repeater> +build_flags = + ${Meshadventurer.build_flags} + -D RADIO_CLASS=CustomSX1262 + -D WRAPPER_CLASS=CustomSX1262Wrapper + -D SX126X_RXEN=RADIOLIB_NC + -D SX126X_TXEN=RADIOLIB_NC + -D P_LORA_EN=14 + -D SX126X_DIO2_AS_RF_SWITCH=1 + -D LORA_FREQ=433.0 + -D LORA_TX_POWER=12 + -D ADVERT_NAME='"ESPNow Bridge"' + -D ADVERT_LAT=0.0 + -D ADVERT_LON=0.0 + -D ADMIN_PASSWORD='"password"' + -D MAX_NEIGHBOURS=50 + -D WITH_ESPNOW_BRIDGE=1 +; -D BRIDGE_DEBUG=1 +; -D MESH_PACKET_LOGGING=1 +; -D MESH_DEBUG=1 +lib_deps = + ${Meshadventurer.lib_deps} + ${esp32_ota.lib_deps} + + //// + [env:Meshadventurer_sx1262_e22p_868m30s_companion_radio_ble] extends = Meshadventurer build_src_filter = ${Meshadventurer.build_src_filter} @@ -384,6 +494,31 @@ lib_deps = ${Meshadventurer.lib_deps} densaugeo/base64 @ ~1.4.0 +[env:Meshadventurer_sx1262_e22p_868m30s_companion_radio_usb] +extends = Meshadventurer +build_src_filter = ${Meshadventurer.build_src_filter} + +<../examples/companion_radio/*.cpp> + +<../examples/companion_radio/ui-new/*.cpp> +build_flags = + ${Meshadventurer.build_flags} + -I examples/companion_radio/ui-new + -D RADIO_CLASS=CustomSX1262 + -D WRAPPER_CLASS=CustomSX1262Wrapper + -D SX126X_RXEN=RADIOLIB_NC + -D SX126X_TXEN=RADIOLIB_NC + -D P_LORA_EN=14 + -D SX126X_DIO2_AS_RF_SWITCH=1 + -D LORA_TX_POWER=12 + -D MAX_CONTACTS=160 + -D MAX_GROUP_CHANNELS=40 + -D OFFLINE_QUEUE_SIZE=128 + -D ENABLE_USB_INTERFACE +; -D MESH_PACKET_LOGGING=1 +; -D MESH_DEBUG=1 +lib_deps = + ${Meshadventurer.lib_deps} + densaugeo/base64 @ ~1.4.0 + [env:Meshadventurer_sx1262_e22p_868m30s_repeater] extends = Meshadventurer build_src_filter = ${Meshadventurer.build_src_filter} @@ -396,6 +531,7 @@ build_flags = -D SX126X_TXEN=RADIOLIB_NC -D P_LORA_EN=14 -D SX126X_DIO2_AS_RF_SWITCH=1 + -D LORA_TX_POWER=12 -D ADVERT_NAME='"Meshadventurer Repeater"' -D ADVERT_LAT=0.0 -D ADVERT_LON=0.0 @@ -403,6 +539,33 @@ build_flags = -D MAX_NEIGHBOURS=50 ; -D MESH_PACKET_LOGGING=1 ; -D MESH_DEBUG=1 +lib_deps = + ${Meshadventurer.lib_deps} + ${esp32_ota.lib_deps} + +[env:Meshadventurer_sx1262_e22p_868m30s_repeater_bridge_espnow] +extends = Meshadventurer +build_src_filter = ${Meshadventurer.build_src_filter} + + + +<../examples/simple_repeater> +build_flags = + ${Meshadventurer.build_flags} + -D RADIO_CLASS=CustomSX1262 + -D WRAPPER_CLASS=CustomSX1262Wrapper + -D SX126X_RXEN=RADIOLIB_NC + -D SX126X_TXEN=RADIOLIB_NC + -D P_LORA_EN=14 + -D SX126X_DIO2_AS_RF_SWITCH=1 + -D LORA_TX_POWER=12 + -D ADVERT_NAME='"ESPNow Bridge"' + -D ADVERT_LAT=0.0 + -D ADVERT_LON=0.0 + -D ADMIN_PASSWORD='"password"' + -D MAX_NEIGHBOURS=50 + -D WITH_ESPNOW_BRIDGE=1 +; -D BRIDGE_DEBUG=1 +; -D MESH_PACKET_LOGGING=1 +; -D MESH_DEBUG=1 lib_deps = ${Meshadventurer.lib_deps} ${esp32_ota.lib_deps} \ No newline at end of file diff --git a/variants/promicro/PromicroBoard.h b/variants/promicro/PromicroBoard.h index ee16c965..f0f12204 100644 --- a/variants/promicro/PromicroBoard.h +++ b/variants/promicro/PromicroBoard.h @@ -5,7 +5,7 @@ #include #define PIN_VBAT_READ 17 -#define ADC_MULTIPLIER (1.815f) // dependent on voltage divider resistors. TODO: more accurate battery tracking +#define ADC_MULTIPLIER (1.778f) // was 1.815 dependent on voltage divider resistors. TODO: more accurate battery tracking class PromicroBoard : public NRF52BoardDCDC { protected: diff --git a/variants/promicro/platformio.ini b/variants/promicro/platformio.ini index 4660c06b..c0918ded 100644 --- a/variants/promicro/platformio.ini +++ b/variants/promicro/platformio.ini @@ -156,6 +156,33 @@ lib_deps = ${Promicro.lib_deps} adafruit/RTClib @ ^2.1.3 densaugeo/base64 @ ~1.4.0 +[env:ProMicro_companion_xiaowa_radio_ble] +extends = Promicro +board_build.ldscript = boards/nrf52840_s140_v6_extrafs.ld +board_upload.maximum_size = 712704 +build_flags = ${Promicro.build_flags} + -I examples/companion_radio/ui-new + -D SX126X_TXEN=RADIOLIB_NC + -D SX126X_DIO2_AS_RF_SWITCH=1 + -D SX126X_POWER_EN=21 + -D MAX_CONTACTS=350 + -D MAX_GROUP_CHANNELS=40 + -D BLE_PIN_CODE=123456 + -D BLE_DEBUG_LOGGING=1 + -D OFFLINE_QUEUE_SIZE=256 + -D DISPLAY_CLASS=SSD1306Display +; -D MESH_PACKET_LOGGING=1 +; -D MESH_DEBUG=1 +build_src_filter = ${Promicro.build_src_filter} + + + + + + + +<../examples/companion_radio/*.cpp> + +<../examples/companion_radio/ui-new/*.cpp> +lib_deps = ${Promicro.lib_deps} + adafruit/RTClib @ ^2.1.3 + densaugeo/base64 @ ~1.4.0 + [env:ProMicro_sensor] extends = Promicro build_flags =