Skip to content

Commit 276a057

Browse files
author
Scott Powell
committed
* lilygo_tlora_v2_1: ui-new
1 parent 2477d60 commit 276a057

File tree

4 files changed

+10
-1
lines changed

4 files changed

+10
-1
lines changed

examples/companion_radio/AbstractUITask.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,5 @@ class AbstractUITask {
4242
virtual void msgRead(int msgcount) = 0;
4343
virtual void newMsg(uint8_t path_len, const char* from_name, const char* text, int msgcount) = 0;
4444
virtual void soundBuzzer(UIEventType bet = UIEventType::none) = 0;
45-
virtual void loop();
45+
virtual void loop() = 0;
4646
};

variants/lilygo_tlora_v2_1/platformio.ini

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,16 @@ lib_deps =
8383
extends = LilyGo_TLora_V2_1_1_6
8484
build_flags =
8585
${LilyGo_TLora_V2_1_1_6.build_flags}
86+
-I examples/companion_radio/ui-new
8687
-D MAX_CONTACTS=100
8788
-D MAX_GROUP_CHANNELS=8
8889
; NOTE: DO NOT ENABLE --> -D MESH_PACKET_LOGGING=1
8990
; NOTE: DO NOT ENABLE --> -D MESH_DEBUG=1
9091
build_src_filter = ${LilyGo_TLora_V2_1_1_6.build_src_filter}
9192
+<helpers/ui/SSD1306Display.cpp>
93+
+<helpers/ui/MomentaryButton.cpp>
9294
+<../examples/companion_radio/*.cpp>
95+
+<../examples/companion_radio/ui-new/*.cpp>
9396
lib_deps =
9497
${LilyGo_TLora_V2_1_1_6.lib_deps}
9598
densaugeo/base64 @ ~1.4.0
@@ -98,6 +101,7 @@ lib_deps =
98101
extends = LilyGo_TLora_V2_1_1_6
99102
build_flags =
100103
${LilyGo_TLora_V2_1_1_6.build_flags}
104+
-I examples/companion_radio/ui-new
101105
-D MAX_CONTACTS=100
102106
-D MAX_GROUP_CHANNELS=8
103107
-D BLE_PIN_CODE=123456
@@ -108,7 +112,9 @@ build_flags =
108112
build_src_filter = ${LilyGo_TLora_V2_1_1_6.build_src_filter}
109113
+<helpers/esp32/*.cpp>
110114
+<helpers/ui/SSD1306Display.cpp>
115+
+<helpers/ui/MomentaryButton.cpp>
111116
+<../examples/companion_radio/*.cpp>
117+
+<../examples/companion_radio/ui-new/*.cpp>
112118
lib_deps =
113119
${LilyGo_TLora_V2_1_1_6.lib_deps}
114120
densaugeo/base64 @ ~1.4.0

variants/lilygo_tlora_v2_1/target.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ EnvironmentSensorManager sensors;
1414

1515
#ifdef DISPLAY_CLASS
1616
DISPLAY_CLASS display;
17+
MomentaryButton user_btn(PIN_USER_BTN, 1000, true);
1718
#endif
1819

1920
bool radio_init() {

variants/lilygo_tlora_v2_1/target.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include <helpers/sensors/EnvironmentSensorManager.h>
1111
#ifdef DISPLAY_CLASS
1212
#include <helpers/ui/SSD1306Display.h>
13+
#include <helpers/ui/MomentaryButton.h>
1314
#endif
1415

1516
extern LilyGoTLoraBoard board;
@@ -19,6 +20,7 @@ extern EnvironmentSensorManager sensors;
1920

2021
#ifdef DISPLAY_CLASS
2122
extern DISPLAY_CLASS display;
23+
extern MomentaryButton user_btn;
2224
#endif
2325

2426
bool radio_init();

0 commit comments

Comments
 (0)