T-Beam refactor

There is a lot to this PR, so if there are any questions let me know.

The idea here is to merge T-Beam fw so that there is less redundant code. Most versions (except the 0.7) share PMU code, init sequence, and most IO pin definitions.

- Merged all T-Beam board.h files into one TBeamBoard.
- Added PMU code to identify different AXP chips.
- Modified "lilygo tbeam SX1276" variant to cover all T-Beam SX1276 versions
- Modified "lilygo tbeam SX1262" variant to cover all T-Beam SX1262 versions
- Enabled GPS on all T-Beam versions/models
- Enabled BME280 on the Supreme

I am also updating EnvironmentSensorManager to allow for boards that do or don't have GPS enable pins, as well as a PERSISTANT_GPS define check for boards that want GPS to stay active after boot.
This commit is contained in:
cod3doomy
2025-06-22 17:46:30 -07:00
rodzic 478a57a6bd
commit 218b96e4aa
15 zmienionych plików z 773 dodań i 718 usunięć
@@ -4,19 +4,28 @@ board = t_beams3_supreme ; LILYGO T-Beam Supreme ESP32S3 with SX1262
build_flags =
${esp32_base.build_flags}
-I variants/lilygo_tbeam_supreme_SX1262
-D TBEAM_SUPREME_SX1262
-D SX126X_CURRENT_LIMIT=140
-D SX126X_RX_BOOSTED_GAIN=1
-D RADIO_CLASS=CustomSX1262
-D WRAPPER_CLASS=CustomSX1262Wrapper
-D DISPLAY_CLASS=SH1106Display
-D LORA_TX_POWER=22
-D P_LORA_TX_LED=6
-D PIN_BOARD_SDA=17
-D PIN_BOARD_SCL=18
-D PIN_GPS_RX=9
-D PIN_GPS_TX=8
-D PIN_GPS_EN=7
-D PIN_USER_BTN=0
-D RADIO_CLASS=CustomSX1262
-D WRAPPER_CLASS=CustomSX1262Wrapper
-D DISPLAY_CLASS=SH1106Display
-D SX126X_RX_BOOSTED_GAIN=1
-D SX126X_CURRENT_LIMIT=140
-D TELEM_BME280_ADDRESS=0x77
-D ENV_INCLUDE_GPS=1
-D ENV_INCLUDE_BME280=1
build_src_filter = ${esp32_base.build_src_filter}
+<../variants/lilygo_tbeam_supreme_SX1262>
+<helpers/ui/SH1106Display.cpp>
+<helpers/esp32/TBeamBoard.cpp>
+<helpers/sensors>
board_build.partitions = min_spiffs.csv ; get around 4mb flash limit
lib_deps =
${esp32_base.lib_deps}