mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
techo: initial support of new companion ui
This commit is contained in:
parent
4b95c981bb
commit
1e711f57f4
4 changed files with 7 additions and 3 deletions
|
|
@ -68,10 +68,10 @@ void GxEPDDisplay::setTextSize(int sz) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void GxEPDDisplay::setColor(Color c) {
|
void GxEPDDisplay::setColor(Color c) {
|
||||||
if (c == DARK) {
|
if (c == DARK) { // invert colors for epds
|
||||||
display.setTextColor(_curr_color = GxEPD_BLACK);
|
|
||||||
} else {
|
|
||||||
display.setTextColor(_curr_color = GxEPD_WHITE);
|
display.setTextColor(_curr_color = GxEPD_WHITE);
|
||||||
|
} else {
|
||||||
|
display.setTextColor(_curr_color = GxEPD_BLACK);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -73,6 +73,7 @@ build_src_filter = ${LilyGo_Techo.build_src_filter}
|
||||||
+<helpers/nrf52/TechoBoard.cpp>
|
+<helpers/nrf52/TechoBoard.cpp>
|
||||||
+<helpers/nrf52/SerialBLEInterface.cpp>
|
+<helpers/nrf52/SerialBLEInterface.cpp>
|
||||||
+<helpers/ui/GxEPDDisplay.cpp>
|
+<helpers/ui/GxEPDDisplay.cpp>
|
||||||
|
+<helpers/ui/MomentaryButton.cpp>
|
||||||
+<../examples/companion_radio>
|
+<../examples/companion_radio>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${LilyGo_Techo.lib_deps}
|
${LilyGo_Techo.lib_deps}
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@ TechoSensorManager sensors = TechoSensorManager(nmea);
|
||||||
|
|
||||||
#ifdef DISPLAY_CLASS
|
#ifdef DISPLAY_CLASS
|
||||||
DISPLAY_CLASS display;
|
DISPLAY_CLASS display;
|
||||||
|
MomentaryButton user_btn(PIN_USER_BTN, 1000, true);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool radio_init() {
|
bool radio_init() {
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@
|
||||||
#include <helpers/sensors/LocationProvider.h>
|
#include <helpers/sensors/LocationProvider.h>
|
||||||
#ifdef DISPLAY_CLASS
|
#ifdef DISPLAY_CLASS
|
||||||
#include <helpers/ui/GxEPDDisplay.h>
|
#include <helpers/ui/GxEPDDisplay.h>
|
||||||
|
#include <helpers/ui/MomentaryButton.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
class TechoSensorManager : public SensorManager {
|
class TechoSensorManager : public SensorManager {
|
||||||
|
|
@ -36,6 +37,7 @@ extern TechoSensorManager sensors;
|
||||||
|
|
||||||
#ifdef DISPLAY_CLASS
|
#ifdef DISPLAY_CLASS
|
||||||
extern DISPLAY_CLASS display;
|
extern DISPLAY_CLASS display;
|
||||||
|
extern MomentaryButton user_btn;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool radio_init();
|
bool radio_init();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue