Browse Source
Merge pull request #362 from jquatier/station-g2-display
Add display to station G2 firmwares
pull/368/head
ripplebiz
1 year ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with
20 additions and
3 deletions
-
variants/station_g2/platformio.ini
-
variants/station_g2/target.cpp
-
variants/station_g2/target.h
|
|
|
@ -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 |
|
|
|
|
|
|
|
@ -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 |
|
|
|
|
|
|
|
@ -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); |
|
|
|
|