mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
Merge branch 'meshcore-dev:main' into muzi-base-duo
This commit is contained in:
commit
e59dc47c0b
49 changed files with 1286 additions and 857 deletions
|
|
@ -178,7 +178,7 @@ build_flags =
|
|||
${Heltec_lora32_v2.build_flags}
|
||||
-I examples/companion_radio/ui-new
|
||||
-D DISPLAY_CLASS=SSD1306Display
|
||||
-D MAX_CONTACTS=160
|
||||
-D MAX_CONTACTS=100
|
||||
-D MAX_GROUP_CHANNELS=8
|
||||
-D WIFI_DEBUG_LOGGING=1
|
||||
-D WIFI_SSID='"myssid"'
|
||||
|
|
|
|||
|
|
@ -11,6 +11,9 @@
|
|||
#ifndef PIN_ADC_CTRL // set in platformio.ini for Heltec Wireless Tracker (2)
|
||||
#define PIN_ADC_CTRL 37
|
||||
#endif
|
||||
#ifndef ADC_MULTIPLIER //default ADC multiplier
|
||||
#define ADC_MULTIPLIER 5.42
|
||||
#endif
|
||||
#define PIN_ADC_CTRL_ACTIVE LOW
|
||||
#define PIN_ADC_CTRL_INACTIVE HIGH
|
||||
|
||||
|
|
@ -88,7 +91,7 @@ public:
|
|||
|
||||
digitalWrite(PIN_ADC_CTRL, !adc_active_state);
|
||||
|
||||
return (5.42 * (3.3 / 1024.0) * raw) * 1000;
|
||||
return (ADC_MULTIPLIER * (3.3 / 1024.0) * raw) * 1000;
|
||||
}
|
||||
|
||||
const char* getManufacturerName() const override {
|
||||
|
|
|
|||
|
|
@ -207,6 +207,7 @@ build_flags =
|
|||
-I examples/companion_radio/ui-new
|
||||
-D MAX_CONTACTS=350
|
||||
-D MAX_GROUP_CHANNELS=40
|
||||
-D OFFLINE_QUEUE_SIZE=256
|
||||
-D DISPLAY_CLASS=SSD1306Display
|
||||
-D WIFI_DEBUG_LOGGING=1
|
||||
-D WIFI_SSID='"myssid"'
|
||||
|
|
@ -370,6 +371,7 @@ build_flags =
|
|||
-I examples/companion_radio/ui-new
|
||||
-D MAX_CONTACTS=350
|
||||
-D MAX_GROUP_CHANNELS=40
|
||||
-D OFFLINE_QUEUE_SIZE=256
|
||||
-D DISPLAY_CLASS=ST7789LCDDisplay
|
||||
-D WIFI_DEBUG_LOGGING=1
|
||||
-D WIFI_SSID='"myssid"'
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ build_flags =
|
|||
;-D PIN_BOARD_SCL=18 ; same GPIO as P_LORA_TX_LED
|
||||
-D PIN_USER_BTN=0
|
||||
-D PIN_VEXT_EN=45
|
||||
-D ADC_MULTIPLIER=8.4
|
||||
-D PIN_VBAT_READ=20
|
||||
-D PIN_ADC_CTRL=19
|
||||
-D SX126X_DIO2_AS_RF_SWITCH=true
|
||||
|
|
@ -63,6 +64,25 @@ lib_deps =
|
|||
densaugeo/base64 @ ~1.4.0
|
||||
bakercp/CRC32 @ ^2.0.0
|
||||
|
||||
[env:Heltec_Wireless_Paper_companion_radio_usb]
|
||||
extends = Heltec_Wireless_Paper_base
|
||||
build_flags =
|
||||
${Heltec_Wireless_Paper_base.build_flags}
|
||||
-I examples/companion_radio/ui-new
|
||||
-D MAX_CONTACTS=350
|
||||
-D MAX_GROUP_CHANNELS=40
|
||||
-D DISPLAY_CLASS=E213Display
|
||||
-D OFFLINE_QUEUE_SIZE=256
|
||||
build_src_filter = ${Heltec_Wireless_Paper_base.build_src_filter}
|
||||
+<helpers/ui/E213Display.cpp>
|
||||
+<helpers/esp32/*.cpp>
|
||||
+<../examples/companion_radio/*.cpp>
|
||||
+<../examples/companion_radio/ui-new/*.cpp>
|
||||
lib_deps =
|
||||
${Heltec_Wireless_Paper_base.lib_deps}
|
||||
densaugeo/base64 @ ~1.4.0
|
||||
bakercp/CRC32 @ ^2.0.0
|
||||
|
||||
[env:Heltec_Wireless_Paper_repeater]
|
||||
extends = Heltec_Wireless_Paper_base
|
||||
build_flags =
|
||||
|
|
|
|||
|
|
@ -154,6 +154,7 @@ build_flags =
|
|||
-I examples/companion_radio/ui-new
|
||||
-D MAX_CONTACTS=350
|
||||
-D MAX_GROUP_CHANNELS=40
|
||||
-D OFFLINE_QUEUE_SIZE=256
|
||||
-D WIFI_DEBUG_LOGGING=1
|
||||
-D WIFI_SSID='"myssid"'
|
||||
-D WIFI_PWD='"mypwd"'
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ build_flags =
|
|||
; -D MESH_DEBUG=1
|
||||
lib_deps =
|
||||
${tlora_c6.lib_deps}
|
||||
; ${esp32_ota.lib_deps}
|
||||
${esp32_ota.lib_deps}
|
||||
|
||||
[env:LilyGo_Tlora_C6_room_server_]
|
||||
extends = tlora_c6
|
||||
|
|
@ -63,7 +63,7 @@ build_flags =
|
|||
; -D MESH_DEBUG=1
|
||||
lib_deps =
|
||||
${tlora_c6.lib_deps}
|
||||
; ${esp32_ota.lib_deps}
|
||||
${esp32_ota.lib_deps}
|
||||
|
||||
[env:LilyGo_Tlora_C6_companion_radio_ble_]
|
||||
extends = tlora_c6
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ extends = LilyGo_TLora_V2_1_1_6
|
|||
build_flags =
|
||||
${LilyGo_TLora_V2_1_1_6.build_flags}
|
||||
-I examples/companion_radio/ui-new
|
||||
-D MAX_CONTACTS=160
|
||||
-D MAX_CONTACTS=100
|
||||
-D MAX_GROUP_CHANNELS=8
|
||||
-D WIFI_SSID='"ssid"'
|
||||
-D WIFI_PWD='"password"'
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ public:
|
|||
digitalWrite(LED_PIN, LOW);
|
||||
#endif
|
||||
#ifdef BUTTON_PIN
|
||||
nrf_gpio_cfg_sense_input(digitalPinToInterrupt(BUTTON_PIN), NRF_GPIO_PIN_PULLUP, NRF_GPIO_PIN_SENSE_HIGH);
|
||||
nrf_gpio_cfg_sense_input(digitalPinToInterrupt(BUTTON_PIN), NRF_GPIO_PIN_PULLUP, NRF_GPIO_PIN_SENSE_LOW);
|
||||
#endif
|
||||
sd_power_system_off();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@ build_flags = ${nrf52840_me25ls01.build_flags}
|
|||
-I variants/minewsemi_me25ls01
|
||||
-D me25ls01
|
||||
-D PIN_USER_BTN=27
|
||||
-D USER_BTN_PRESSED=HIGH
|
||||
-D PIN_STATUS_LED=39
|
||||
-D P_LORA_TX_LED=22
|
||||
-D RADIO_CLASS=CustomLR1110
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ public:
|
|||
uint8_t v = digitalRead(BUTTON_PIN);
|
||||
if (v != btn_prev_state) {
|
||||
btn_prev_state = v;
|
||||
return (v == LOW) ? 1 : -1;
|
||||
return (v == USER_BTN_PRESSED) ? 1 : -1;
|
||||
}
|
||||
#endif
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ build_flags = ${nrf52_base.build_flags}
|
|||
-D P_LORA_NSS=12 ; P0.12
|
||||
-D P_LORA_DIO_1=33 ; P1.1
|
||||
-D P_LORA_MISO=40 ; P1.8
|
||||
-D P_LORA_MOSI=41 ; P0.9
|
||||
-D P_LORA_MOSI=41 ; P1.9
|
||||
-D P_LORA_RESET=42 ; P1.10
|
||||
-D LR11X0_DIO_AS_RF_SWITCH=true
|
||||
-D LR11X0_DIO3_TCXO_VOLTAGE=1.6
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ const uint32_t g_ADigitalPinMap[PINS_COUNT + 1] =
|
|||
42, // P1.10, LORA_RESET
|
||||
43, // P1.11, GPS_EN
|
||||
44, // P1.12, GPS_SLEEP_INT
|
||||
45, // P1.13
|
||||
45, // P1.13, FLASH_ENABLE
|
||||
46, // P1.14, GPS_RESETB
|
||||
47, // P1.15, PIN_GPS_RESET
|
||||
255, // NRFX_SPIM_PIN_NOT_USED
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@
|
|||
#define LORA_BUSY (7) // P0.7
|
||||
#define LORA_SCLK (PIN_SPI_SCK) // P0.11
|
||||
#define LORA_MISO (PIN_SPI_MISO) // P1.8
|
||||
#define LORA_MOSI (PIN_SPI_MOSI) // P0.9
|
||||
#define LORA_MOSI (PIN_SPI_MOSI) // P1.9
|
||||
|
||||
#define LR11X0_DIO_AS_RF_SWITCH true
|
||||
#define LR11X0_DIO3_TCXO_VOLTAGE 1.6
|
||||
|
|
@ -133,4 +133,4 @@
|
|||
// Buzzer
|
||||
|
||||
#define BUZZER_EN (37) // P1.5
|
||||
#define BUZZER_PIN (25) // P0.25
|
||||
#define BUZZER_PIN (25) // P0.25
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@ build_flags = ${nrf52_base.build_flags}
|
|||
-I src/helpers/ui
|
||||
-D THINKNODE_M3
|
||||
-D PIN_USER_BTN=12
|
||||
-D USER_BTN_PRESSED=LOW
|
||||
-D PIN_STATUS_LED=35
|
||||
-D RADIO_CLASS=CustomLR1110
|
||||
-D WRAPPER_CLASS=CustomLR1110Wrapper
|
||||
|
|
|
|||
|
|
@ -20,7 +20,8 @@ build_flags = ${rp2040_base.build_flags}
|
|||
-D P_LORA_MOSI=15
|
||||
-D P_LORA_TX_LED=25
|
||||
-D SX126X_DIO2_AS_RF_SWITCH=true
|
||||
-D SX126X_DIO3_TCXO_VOLTAGE=0
|
||||
-D SX126X_RXEN=17
|
||||
-D SX126X_DIO3_TCXO_VOLTAGE=1.8
|
||||
-D SX126X_RX_BOOSTED_GAIN=1
|
||||
-D LORA_TX_POWER=22
|
||||
; Debug options
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@ build_flags = ${stm32_base.build_flags}
|
|||
-D RX_BOOSTED_GAIN=true
|
||||
-D P_LORA_TX_LED=LED_RED
|
||||
-D PIN_USER_BTN=USER_BTN
|
||||
-D USER_BTN_PRESSED=LOW
|
||||
-I variants/wio-e5-mini
|
||||
build_src_filter = ${stm32_base.build_src_filter}
|
||||
+<../variants/wio-e5-mini>
|
||||
|
|
|
|||
|
|
@ -3,9 +3,6 @@ extends = esp32_base
|
|||
board = seeed_xiao_esp32c3
|
||||
build_flags =
|
||||
${esp32_base.build_flags}
|
||||
${sensor_base.build_flags}
|
||||
-UENV_INCLUDE_GPS
|
||||
-UENV_INCLUDE_VL53L0X
|
||||
-I variants/xiao_c3
|
||||
-D ESP32_CPU_FREQ=80
|
||||
-D PIN_VBAT_READ=D0
|
||||
|
|
@ -29,7 +26,6 @@ build_src_filter = ${esp32_base.build_src_filter}
|
|||
+<helpers/sensors>
|
||||
lib_deps =
|
||||
${esp32_base.lib_deps}
|
||||
${sensor_base.lib_deps}
|
||||
|
||||
[env:Xiao_C3_repeater]
|
||||
extends = Xiao_esp32_C3
|
||||
|
|
@ -37,6 +33,9 @@ build_src_filter = ${Xiao_esp32_C3.build_src_filter}
|
|||
+<../examples/simple_repeater/*.cpp>
|
||||
build_flags =
|
||||
${Xiao_esp32_C3.build_flags}
|
||||
${sensor_base.build_flags}
|
||||
-UENV_INCLUDE_GPS
|
||||
-UENV_INCLUDE_VL53L0X
|
||||
-D ADVERT_NAME='"Xiao C3 Repeater"'
|
||||
-D ADVERT_LAT=0.0
|
||||
-D ADVERT_LON=0.0
|
||||
|
|
@ -46,6 +45,7 @@ build_flags =
|
|||
; -D MESH_DEBUG=1
|
||||
lib_deps =
|
||||
${Xiao_esp32_C3.lib_deps}
|
||||
${sensor_base.lib_deps}
|
||||
${esp32_ota.lib_deps}
|
||||
bakercp/CRC32 @ ^2.0.0
|
||||
|
||||
|
|
@ -55,6 +55,9 @@ build_src_filter = ${Xiao_esp32_C3.build_src_filter}
|
|||
+<../examples/simple_room_server/*.cpp>
|
||||
build_flags =
|
||||
${Xiao_esp32_C3.build_flags}
|
||||
${sensor_base.build_flags}
|
||||
-UENV_INCLUDE_GPS
|
||||
-UENV_INCLUDE_VL53L0X
|
||||
-D ADVERT_NAME='"Xiao C3 Room"'
|
||||
-D ADVERT_LAT=0.0
|
||||
-D ADVERT_LON=0.0
|
||||
|
|
@ -64,6 +67,7 @@ build_flags =
|
|||
; -D MESH_DEBUG=1
|
||||
lib_deps =
|
||||
${Xiao_esp32_C3.lib_deps}
|
||||
${sensor_base.lib_deps}
|
||||
${esp32_ota.lib_deps}
|
||||
bakercp/CRC32 @ ^2.0.0
|
||||
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ build_flags =
|
|||
; -D MESH_DEBUG=1
|
||||
lib_deps =
|
||||
${Xiao_C6.lib_deps}
|
||||
; ${esp32_ota.lib_deps}
|
||||
${esp32_ota.lib_deps}
|
||||
|
||||
[env:Xiao_C6_companion_radio_ble_]
|
||||
extends = Xiao_C6
|
||||
|
|
@ -163,7 +163,7 @@ build_flags =
|
|||
; -D MESH_DEBUG=1
|
||||
lib_deps =
|
||||
${WHY2025_badge.lib_deps}
|
||||
; ${esp32_ota.lib_deps}
|
||||
${esp32_ota.lib_deps}
|
||||
|
||||
[env:WHY2025_badge_companion_radio_ble_]
|
||||
extends = WHY2025_badge
|
||||
|
|
|
|||
|
|
@ -4,6 +4,10 @@
|
|||
#include <Arduino.h>
|
||||
#include <helpers/NRF52Board.h>
|
||||
|
||||
#ifndef USER_BTN_PRESSED
|
||||
#define USER_BTN_PRESSED LOW
|
||||
#endif
|
||||
|
||||
#ifdef XIAO_NRF52
|
||||
|
||||
class XiaoNrf52Board : public NRF52BoardDCDC {
|
||||
|
|
@ -35,7 +39,7 @@ public:
|
|||
// set led on and wait for button release before poweroff
|
||||
digitalWrite(PIN_LED, LOW);
|
||||
#ifdef PIN_USER_BTN
|
||||
while(digitalRead(PIN_USER_BTN) == LOW);
|
||||
while(digitalRead(PIN_USER_BTN) == USER_BTN_PRESSED);
|
||||
#endif
|
||||
digitalWrite(LED_GREEN, HIGH);
|
||||
digitalWrite(LED_BLUE, HIGH);
|
||||
|
|
|
|||
|
|
@ -72,11 +72,11 @@ build_flags =
|
|||
-I examples/companion_radio/ui-orig
|
||||
-D MAX_CONTACTS=350
|
||||
-D MAX_GROUP_CHANNELS=40
|
||||
-D OFFLINE_QUEUE_SIZE=256
|
||||
-D QSPIFLASH=1
|
||||
; -D MESH_PACKET_LOGGING=1
|
||||
; -D MESH_DEBUG=1
|
||||
build_src_filter = ${Xiao_nrf52.build_src_filter}
|
||||
+<helpers/nrf52/SerialBLEInterface.cpp>
|
||||
+<../examples/companion_radio/*.cpp>
|
||||
+<../examples/companion_radio/ui-orig/*.cpp>
|
||||
lib_deps =
|
||||
|
|
@ -117,4 +117,4 @@ build_flags =
|
|||
build_src_filter = ${Xiao_nrf52.build_src_filter}
|
||||
+<../examples/kiss_modem/*.cpp>
|
||||
lib_deps =
|
||||
${Xiao_nrf52.lib_deps}
|
||||
${Xiao_nrf52.lib_deps}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue