Merge pull request #362 from jquatier/station-g2-display

Add display to station G2 firmwares
This commit is contained in:
ripplebiz
2025-06-03 14:00:53 +10:00
committed by GitHub
3 changed files with 20 additions and 3 deletions

View File

@@ -9,18 +9,23 @@ build_flags =
-D WRAPPER_CLASS=CustomSX1262Wrapper
-D LORA_TX_POWER=7
; -D P_LORA_TX_LED=35
; -D PIN_BOARD_SDA=5
; -D PIN_BOARD_SCL=6
-D PIN_USER_BTN=0
-D PIN_BOARD_SDA=5
-D PIN_BOARD_SCL=6
-D PIN_USER_BTN=38
-D SX126X_DIO2_AS_RF_SWITCH=true
-D SX126X_DIO3_TCXO_VOLTAGE=1.8
-D SX126X_CURRENT_LIMIT=140
; -D SX126X_RX_BOOSTED_GAIN=1 - DO NOT ENABLE THIS!
-I src/helpers/ui
-D DISPLAY_CLASS=SH1106Display
; https://wiki.uniteng.com/en/meshtastic/station-g2#impact-of-lora-node-dense-areashigh-noise-environments-on-rf-performance
build_src_filter = ${esp32_base.build_src_filter}
+<../variants/station_g2>
+<helpers/ui/SH1106Display.cpp>
lib_deps =
${esp32_base.lib_deps}
adafruit/Adafruit SH110X @ ~2.1.13
adafruit/Adafruit GFX Library @ ^1.12.1
[env:Station_G2_repeater]
extends = Station_G2

View File

@@ -16,6 +16,10 @@ ESP32RTCClock fallback_clock;
AutoDiscoverRTCClock rtc_clock(fallback_clock);
SensorManager sensors;
#ifdef DISPLAY_CLASS
DISPLAY_CLASS display;
#endif
#ifndef LORA_CR
#define LORA_CR 5
#endif

View File

@@ -8,11 +8,19 @@
#include <helpers/AutoDiscoverRTCClock.h>
#include <helpers/SensorManager.h>
#ifdef DISPLAY_CLASS
#include <helpers/ui/SH1106Display.h>
#endif
extern StationG2Board board;
extern WRAPPER_CLASS radio_driver;
extern AutoDiscoverRTCClock rtc_clock;
extern SensorManager sensors;
#ifdef DISPLAY_CLASS
extern DISPLAY_CLASS display;
#endif
bool radio_init();
uint32_t radio_get_rng_seed();
void radio_set_params(float freq, float bw, uint8_t sf, uint8_t cr);