Merge branch 'master' into apollo

This commit is contained in:
Thomas Göttgens
2023-10-31 14:10:07 +01:00
committed by GitHub
78 changed files with 906 additions and 615 deletions

View File

@@ -11,4 +11,4 @@ lib_deps =
https://github.com/meshtastic/ESP32_Codec2.git#633326c78ac251c059ab3a8c430fcdf25b41672f
zinggjm/GxEPD2@^1.4.9
debug_tool = jlink
upload_port = /dev/ttyACM4
;upload_port = /dev/ttyACM4

View File

@@ -11,7 +11,7 @@ build_flags =
-I variants/betafpv_2400_tx_micro
board_build.f_cpu = 240000000L
upload_protocol = esptool
upload_port = /dev/ttyUSB0
;upload_port = /dev/ttyUSB0
upload_speed = 460800
lib_deps =
${esp32_base.lib_deps}

View File

@@ -10,7 +10,7 @@ build_flags =
-I variants/betafpv_900_tx_nano
board_build.f_cpu = 240000000L
upload_protocol = esptool
upload_port = /dev/ttyUSB0
;upload_port = /dev/ttyUSB0
upload_speed = 460800
lib_deps =
${esp32_base.lib_deps}

View File

@@ -6,7 +6,7 @@ board_level = extra
;upload_protocol = esp-builtin
;Normal method
upload_protocol = esptool
upload_port = /dev/ttyACM2
;upload_port = /dev/ttyACM2
lib_deps =
${esp32_base.lib_deps}
caveman99/ESP32 Codec2@^1.0.1

View File

@@ -2,13 +2,11 @@
#define I2C_SDA 21
#define I2C_SCL 22
// GPS
#undef GPS_RX_PIN
#undef GPS_TX_PIN
#define GPS_RX_PIN 12
// For GPS, 'undef's not needed
#define GPS_TX_PIN 15
#define GPS_UBLOX
#define GPS_RX_PIN 12
#define PIN_GPS_EN 4
#define GPS_POWER_TOGGLE // Moved definition from platformio.ini to here
#define BUTTON_PIN 39 // The middle button GPIO on the T-Beam
#define BATTERY_PIN 35 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage
@@ -18,28 +16,25 @@
#define EXT_NOTIFY_OUT 12 // Overridden default pin to use for Ext Notify Module (#975).
#define LED_PIN 2 // add status LED (compatible with core-pcb and DIY targets)
#define LORA_DIO0 26 // a No connect on the SX1262/SX1268 module
#define LORA_RESET 23 // RST for SX1276, and for SX1262/SX1268
#define LORA_DIO1 33 // IRQ for SX1262/SX1268
#define LORA_DIO2 32 // BUSY for SX1262/SX1268
#define LORA_DIO3 // Not connected on PCB, but internally on the TTGO SX1262/SX1268, if DIO3 is high the TXCO is enabled
// Radio
#define USE_SX1262 // E22-900M30S uses SX1262
#define SX126X_MAX_POWER \
22 // Outputting 22dBm from SX1262 results in ~30dBm E22-900M30S output (module only uses last stage of the YP2233W PA)
#define SX126X_DIO3_TCXO_VOLTAGE 1.8 // E22 series TCXO reference voltage is 1.8V
#define RF95_SCK 5
#define RF95_MISO 19
#define RF95_MOSI 27
#define RF95_NSS 18
#define SX126X_CS 18 // EBYTE module's NSS pin
#define SX126X_SCK 5 // EBYTE module's SCK pin
#define SX126X_MOSI 27 // EBYTE module's MOSI pin
#define SX126X_MISO 19 // EBYTE module's MISO pin
#define SX126X_RESET 23 // EBYTE module's NRST pin
#define SX126X_BUSY 32 // EBYTE module's BUSY pin
#define SX126X_DIO1 33 // EBYTE module's DIO1 pin
#define USE_SX1262
#define SX126X_TXEN 13 // Schematic connects EBYTE module's TXEN pin to MCU
#define SX126X_RXEN 14 // Schematic connects EBYTE module's RXEN pin to MCU
#define SX126X_CS 18 // NSS for SX126X
#define SX126X_DIO1 LORA_DIO1
#define SX126X_BUSY LORA_DIO2
#define SX126X_RESET LORA_RESET
#define SX126X_RXEN 14
#define SX126X_TXEN RADIOLIB_NC
#define SX126X_DIO2_AS_RF_SWITCH
// Set lora.tx_power to 13 for Hydra or other E22 900M30S target due to PA
#define SX126X_MAX_POWER 13
#define SX126X_DIO3_TCXO_VOLTAGE 1.8
#define RF95_NSS SX126X_CS // Compatibility with variant file configuration structure
#define RF95_SCK SX126X_SCK // Compatibility with variant file configuration structure
#define RF95_MOSI SX126X_MOSI // Compatibility with variant file configuration structure
#define RF95_MISO SX126X_MISO // Compatibility with variant file configuration structure
#define LORA_DIO1 SX126X_DIO1 // Compatibility with variant file configuration structure

View File

@@ -43,6 +43,4 @@ board_level = extra
build_flags =
${esp32_base.build_flags}
-D DIY_V1
-D EBYTE_E22
-D GPS_POWER_TOGGLE
-I variants/diy/hydra

View File

@@ -8,5 +8,5 @@ build_flags =
-I variants/heltec_esp32c3
monitor_speed = 115200
upload_protocol = esptool
upload_port = /dev/ttyUSB0
upload_speed = 921600
;upload_port = /dev/ttyUSB0
upload_speed = 921600

View File

@@ -9,9 +9,11 @@
#define ST7735_RESET 39
#define ST7735_MISO -1
#define ST7735_BUSY -1
#define ST7735_BL 45
#define ST7735_BL_V03 45
#define ST7735_BL_V05 21 /* V1.1 PCB marking */
#define ST7735_SPI_HOST SPI3_HOST
#define ST7735_BACKLIGHT_EN 45
#define ST7735_BACKLIGHT_EN_V03 45
#define ST7735_BACKLIGHT_EN_V05 21
#define SPI_FREQUENCY 40000000
#define SPI_READ_FREQUENCY 16000000
#define SCREEN_ROTATE
@@ -19,17 +21,20 @@
#define TFT_WIDTH 80
#define TFT_OFFSET_X 26
#define TFT_OFFSET_Y 0
#define VTFT_CTRL 46 // Heltec Tracker needs this pulled low for TFT
#define VTFT_CTRL_V03 46 // Heltec Tracker needs this pulled low for TFT
#define VTFT_CTRL_V05 -1
#define SCREEN_TRANSITION_FRAMERATE 1 // fps
#define DISPLAY_FORCE_SMALL_FONTS
#define VEXT_ENABLE Vext // active low, powers the oled display and the lora antenna boost
#define VEXT_ENABLE_V03 Vext // active low, powers the oled display and the lora antenna boost
#define VEXT_ENABLE_V05 3 // active HIGH, powers the oled display
#define BUTTON_PIN 0
#define BATTERY_PIN 1 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage
#define ADC_CHANNEL ADC1_GPIO1_CHANNEL
#define ADC_ATTENUATION ADC_ATTEN_DB_2_5 // lower dB for high resistance voltage divider
#define ADC_MULTIPLIER 4.9
#define ADC_CTRL 2 // active HIGH, powers the voltage divider. Only on 1.1
#undef GPS_RX_PIN
#undef GPS_TX_PIN
@@ -37,9 +42,12 @@
#define GPS_TX_PIN 34
#define PIN_GPS_RESET 35
#define PIN_GPS_PPS 36
#define VGNSS_CTRL 37 // Heltec Tracker needs this pulled low for GPS
#define PIN_GPS_EN VGNSS_CTRL
#define VGNSS_CTRL_V03 37 // Heltec Tracker needs this pulled low for GPS
#define VGNSS_CTRL_V05 -1 // Heltec Tracker needs this pulled low for GPS
#define PIN_GPS_EN VGNSS_CTRL_V03
#define GPS_EN_ACTIVE LOW
#define GPS_RESET_MODE LOW
#define GPS_UC6580

View File

@@ -8,8 +8,6 @@
#define VEXT_ENABLE Vext // active low, powers the oled display and the lora antenna boost
#define BUTTON_PIN 0
#define PIN_GPS_EN 46 // GPS power enable pin
#define BATTERY_PIN 1 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage
#define ADC_CHANNEL ADC1_GPIO1_CHANNEL
#define ADC_ATTENUATION ADC_ATTEN_DB_2_5 // lower dB for high resistance voltage divider

View File

@@ -8,5 +8,5 @@ build_flags =
-I variants/m5stack-stamp-c3
monitor_speed = 115200
upload_protocol = esptool
upload_port = /dev/ttyACM2
;upload_port = /dev/ttyACM2
upload_speed = 921600

View File

@@ -23,4 +23,4 @@ lib_ignore =
monitor_filters = esp32_exception_decoder
board_build.f_cpu = 240000000L
upload_protocol = esptool
upload_port = /dev/ttyACM0
;upload_port = /dev/ttyACM0

View File

@@ -6,7 +6,7 @@ board_build.arduino.memory_type = dio_opi
board_build.mcu = esp32s3
board_build.f_cpu = 240000000L
upload_protocol = esptool
upload_port = /dev/ttyACM1
;upload_port = /dev/ttyACM1
upload_speed = 921600
platform_packages =
tool-esptoolpy@^1.40500.0

View File

@@ -6,7 +6,7 @@ board_build.arduino.memory_type = dio_opi
board_build.mcu = esp32s3
board_build.f_cpu = 240000000L
upload_protocol = esptool
upload_port = /dev/ttyACM0
;upload_port = /dev/ttyACM0
upload_speed = 921600
platform_packages =
tool-esptoolpy@^1.40500.0

View File

@@ -15,4 +15,4 @@ lib_deps =
debug_tool = jlink
; If not set we will default to uploading over serial (first it forces bootloader entry by talking 1200bps to cdcacm)
;upload_protocol = jlink
upload_port = /dev/ttyACM3
;upload_port = /dev/ttyACM3

View File

@@ -42,3 +42,4 @@
#define GPS_UBLOX
#define GPS_RX_PIN 34
#define GPS_TX_PIN 12
// #define GPS_DEBUG

View File

@@ -0,0 +1,13 @@
[env:trackerd]
extends = esp32_base
;platform = https://github.com/platformio/platform-espressif32.git#feature/arduino-upstream
platform = espressif32
board = pico32
board_build.f_flash = 80000000L
board_level = extra
build_flags =
${esp32_base.build_flags} -D PRIVATE_HW -I variants/trackerd -D BSFILE=\"boards/dragino_lbt2.h\"
;board_build.partitions = no_ota.csv
;platform_packages =
; platformio/framework-arduinoespressif32@3
;platformio/framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#2.0.1-RC1

View File

@@ -0,0 +1,46 @@
// Initialize i2c bus on sd_dat and esp_led pins, respectively. We need a bus to not hang on boot
#define HAS_SCREEN 0
#define I2C_SDA 21
#define I2C_SCL 22
#undef GPS_RX_PIN
#undef GPS_TX_PIN
#define GPS_RX_PIN 9
#define GPS_TX_PIN 10
#define LED_PIN 13 // 13 red, 2 blue, 15 red
//#define HAS_BUTTON 0
#define BUTTON_PIN 0
#define BUTTON_NEED_PULLUP
#define USE_RF95
#define LORA_DIO0 26 // a No connect on the SX1262 module
#define LORA_RESET 23
#define LORA_DIO1 33
#define LORA_DIO2 32 // Not really used
#define BATTERY_PIN 35 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage
// Battery
// The battery sense is hooked to pin A0 (4)
// it is defined in the anlaolgue pin section of this file
// and has 12 bit resolution
#define BATTERY_SENSE_RESOLUTION_BITS 12
#define BATTERY_SENSE_RESOLUTION 4096.0
// Definition of milliVolt per LSB => 3.0V ADC range and 12-bit ADC resolution = 3000mV/4096
#define VBAT_MV_PER_LSB (0.73242188F)
// Voltage divider value => 100K + 100K voltage divider on VBAT = (100K / (100K + 100K))
#define VBAT_DIVIDER (0.5F)
// Compensation factor for the VBAT divider
#define VBAT_DIVIDER_COMP (2.0)
// Fixed calculation of milliVolt from compensation value
#define REAL_VBAT_MV_PER_LSB (VBAT_DIVIDER_COMP * VBAT_MV_PER_LSB)
#undef AREF_VOLTAGE
#define AREF_VOLTAGE 3.0
#define VBAT_AR_INTERNAL AR_INTERNAL_3_0
#define ADC_MULTIPLIER VBAT_DIVIDER_COMP
#define VBAT_RAW_TO_SCALED(x) (REAL_VBAT_MV_PER_LSB * x)
//#define BATTERY_SENSE_SAMPLES 15 // Set the number of samples, It has an effect of increasing sensitivity.
//#define ADC_MULTIPLIER 3.3