Skip to content

Commit 5bc8756

Browse files
authored
Merge pull request #362 from jquatier/station-g2-display
Add display to station G2 firmwares
2 parents 8cf20c7 + 203a7f2 commit 5bc8756

File tree

3 files changed

+20
-3
lines changed

3 files changed

+20
-3
lines changed

variants/station_g2/platformio.ini

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,23 @@ build_flags =
99
-D WRAPPER_CLASS=CustomSX1262Wrapper
1010
-D LORA_TX_POWER=7
1111
; -D P_LORA_TX_LED=35
12-
; -D PIN_BOARD_SDA=5
13-
; -D PIN_BOARD_SCL=6
14-
-D PIN_USER_BTN=0
12+
-D PIN_BOARD_SDA=5
13+
-D PIN_BOARD_SCL=6
14+
-D PIN_USER_BTN=38
1515
-D SX126X_DIO2_AS_RF_SWITCH=true
1616
-D SX126X_DIO3_TCXO_VOLTAGE=1.8
1717
-D SX126X_CURRENT_LIMIT=140
1818
; -D SX126X_RX_BOOSTED_GAIN=1 - DO NOT ENABLE THIS!
19+
-I src/helpers/ui
20+
-D DISPLAY_CLASS=SH1106Display
1921
; https://wiki.uniteng.com/en/meshtastic/station-g2#impact-of-lora-node-dense-areashigh-noise-environments-on-rf-performance
2022
build_src_filter = ${esp32_base.build_src_filter}
2123
+<../variants/station_g2>
24+
+<helpers/ui/SH1106Display.cpp>
2225
lib_deps =
2326
${esp32_base.lib_deps}
27+
adafruit/Adafruit SH110X @ ~2.1.13
28+
adafruit/Adafruit GFX Library @ ^1.12.1
2429

2530
[env:Station_G2_repeater]
2631
extends = Station_G2

variants/station_g2/target.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ ESP32RTCClock fallback_clock;
1616
AutoDiscoverRTCClock rtc_clock(fallback_clock);
1717
SensorManager sensors;
1818

19+
#ifdef DISPLAY_CLASS
20+
DISPLAY_CLASS display;
21+
#endif
22+
1923
#ifndef LORA_CR
2024
#define LORA_CR 5
2125
#endif

variants/station_g2/target.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,19 @@
88
#include <helpers/AutoDiscoverRTCClock.h>
99
#include <helpers/SensorManager.h>
1010

11+
#ifdef DISPLAY_CLASS
12+
#include <helpers/ui/SH1106Display.h>
13+
#endif
14+
1115
extern StationG2Board board;
1216
extern WRAPPER_CLASS radio_driver;
1317
extern AutoDiscoverRTCClock rtc_clock;
1418
extern SensorManager sensors;
1519

20+
#ifdef DISPLAY_CLASS
21+
extern DISPLAY_CLASS display;
22+
#endif
23+
1624
bool radio_init();
1725
uint32_t radio_get_rng_seed();
1826
void radio_set_params(float freq, float bw, uint8_t sf, uint8_t cr);

0 commit comments

Comments
 (0)