Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 35 additions & 11 deletions variants/thinknode_m5/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ build_flags = ${esp32_base.build_flags}
-D PIN_BUTTON2=14
-D EXP_PIN_LED=1 ; led is on bus expander
-D DISPLAY_ROTATION=4
-D DISPLAY_CLASS=GxEPDDisplay
-D EINK_DISPLAY_MODEL=GxEPD2_154_D67
-D EINK_SCALE_X=1.5625f
-D EINK_SCALE_Y=1.5625f
Expand Down Expand Up @@ -49,7 +48,9 @@ build_src_filter = ${esp32_base.build_src_filter}
+<helpers/sensors/EnvironmentSensorManager.cpp>
+<helpers/ui/MomentaryButton.cpp>
+<helpers/ui/GxEPDDisplay.cpp>
+<../variants/thinknode_m5>
+<helpers/ui/BaseUITask.cpp>
+<../variants/thinknode_m5/target.cpp>
+<../variants/thinknode_m5/ThinknodeM5Board.cpp>
lib_deps = ${esp32_base.lib_deps}
zinggjm/GxEPD2 @ 1.6.2
bakercp/CRC32 @ ^2.0.0
Expand All @@ -60,13 +61,17 @@ lib_deps = ${esp32_base.lib_deps}
extends = ThinkNode_M5
build_src_filter = ${ThinkNode_M5.build_src_filter}
+<../examples/simple_repeater/*.cpp>
+<../variants/thinknode_m5/target-other.cpp>
+<helpers/ui/server>
build_flags =
${ThinkNode_M5.build_flags}
-I src/helpers/ui/server
-D ADVERT_NAME='"Thinknode M5 Repeater"'
-D ADVERT_LAT=0.0
-D ADVERT_LON=0.0
-D ADMIN_PASSWORD='"password"'
-D MAX_NEIGHBOURS=8
-D DISPLAY_CLASS=GxEPDDisplay
; -D MESH_PACKET_LOGGING=1
; -D MESH_DEBUG=1
lib_deps =
Expand Down Expand Up @@ -99,15 +104,19 @@ extends = ThinkNode_M5
build_src_filter = ${ThinkNode_M5.build_src_filter}
+<helpers/bridges/ESPNowBridge.cpp>
+<../examples/simple_repeater/*.cpp>
+<../variants/thinknode_m5/target-other.cpp>
+<helpers/ui/server>
build_flags =
${ThinkNode_M5.build_flags}
-I src/helpers/ui/server
-D ADVERT_NAME='"ESPNow Bridge"'
-D ADVERT_LAT=0.0
-D ADVERT_LON=0.0
-D ADMIN_PASSWORD='"password"'
-D MAX_NEIGHBOURS=8
-D WITH_ESPNOW_BRIDGE=1
-D WITH_ESPNOW_BRIDGE_SECRET='"shared-secret"'
-D DISPLAY_CLASS=GxEPDDisplay
; -D MESH_PACKET_LOGGING=1
; -D MESH_DEBUG=1
lib_deps =
Expand All @@ -118,13 +127,17 @@ lib_deps =
extends = ThinkNode_M5
build_src_filter = ${ThinkNode_M5.build_src_filter}
+<../examples/simple_room_server>
+<../variants/thinknode_m5/target-other.cpp>
+<helpers/ui/server>
build_flags =
${ThinkNode_M5.build_flags}
-I src/helpers/ui/server
-D ADVERT_NAME='"Thinknode M5 Room Server"'
-D ADVERT_LAT=0.0
-D ADVERT_LON=0.0
-D ADMIN_PASSWORD='"password"'
-D ROOM_PASSWORD='"hello"'
-D DISPLAY_CLASS=GxEPDDisplay
; -D MESH_PACKET_LOGGING=1
; -D MESH_DEBUG=1
lib_deps =
Expand All @@ -149,19 +162,21 @@ lib_deps =
extends = ThinkNode_M5
build_flags =
${ThinkNode_M5.build_flags}
-I examples/companion_radio/ui-new
-D MAX_CONTACTS=350
-D MAX_GROUP_CHANNELS=40
-D BLE_PIN_CODE=123456
-D OFFLINE_QUEUE_SIZE=256
-D DISPLAY_CLASS=GxEPDDisplay
; -D BLE_DEBUG_LOGGING=1
; -D MESH_PACKET_LOGGING=1
; -D GPS_NMEA_DEBUG
-I src/helpers/ui/companion-new
build_src_filter = ${ThinkNode_M5.build_src_filter}
+<../examples/companion_radio/*.cpp>
+<../variants/thinknode_m5/target-companion.cpp>
+<helpers/ui/companion-new>
+<helpers/esp32/*.cpp>
+<helpers/ui/MomentaryButton.cpp>
+<../examples/companion_radio/*.cpp>
+<../examples/companion_radio/ui-new/*.cpp>
+<helpers/ui/buzzer.cpp>
lib_deps =
${ThinkNode_M5.lib_deps}
Expand All @@ -178,11 +193,14 @@ build_flags =
-D OFFLINE_QUEUE_SIZE=256
-D ENABLE_USB_INTERFACE
-D ENABLE_WIFI_INTERFACE
-D DISPLAY_CLASS=GxEPDDisplay
-I src/helpers/ui/companion-new
build_src_filter = ${ThinkNode_M5.build_src_filter}
+<../examples/companion_radio/*.cpp>
+<../variants/thinknode_m5/target-companion.cpp>
+<helpers/ui/companion-new>
+<helpers/esp32/*.cpp>
+<helpers/ui/MomentaryButton.cpp>
+<../examples/companion_radio/*.cpp>
+<../examples/companion_radio/ui-new/*.cpp>
+<helpers/ui/buzzer.cpp>
+<helpers/wifi/*.cpp>
lib_deps =
Expand All @@ -202,12 +220,15 @@ build_flags =
-D WIFI_DEBUG_LOGGING=1
-D WIFI_SSID='"myssid"'
-D WIFI_PWD='"mypwd"'
-D DISPLAY_CLASS=GxEPDDisplay
-I src/helpers/ui/companion-new
build_src_filter = ${ThinkNode_M5.build_src_filter}
+<../examples/companion_radio/*.cpp>
+<../variants/thinknode_m5/target-companion.cpp>
+<helpers/ui/companion-new>
+<helpers/esp32/*.cpp>
+<helpers/wifi/*.cpp>
+<helpers/ui/MomentaryButton.cpp>
+<../examples/companion_radio/*.cpp>
+<../examples/companion_radio/ui-new/*.cpp>
+<helpers/ui/buzzer.cpp>
lib_deps =
${ThinkNode_M5.lib_deps}
Expand All @@ -223,13 +244,16 @@ build_flags =
-D MAX_GROUP_CHANNELS=40
-D SERIAL_TX=D6
-D SERIAL_RX=D7
-D DISPLAY_CLASS=GxEPDDisplay
; -D MESH_PACKET_LOGGING=1
; -D MESH_DEBUG=1
-I src/helpers/ui/companion-new
build_src_filter = ${ThinkNode_M5.build_src_filter}
+<../examples/companion_radio/*.cpp>
+<../variants/thinknode_m5/target-companion.cpp>
+<helpers/ui/companion-new>
+<helpers/esp32/*.cpp>
+<helpers/ui/MomentaryButton.cpp>
+<../examples/companion_radio/*.cpp>
+<../examples/companion_radio/ui-new/*.cpp>
+<helpers/ui/buzzer.cpp>
lib_deps =
${ThinkNode_M5.lib_deps}
Expand Down
10 changes: 10 additions & 0 deletions variants/thinknode_m5/target-companion.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#include <Arduino.h>
#include "target.h"

#ifdef DISPLAY_CLASS
DISPLAY_CLASS display;
MomentaryButton user_btn(PIN_USER_BTN, 1000, true);
MomentaryButton backlight_btn(BACKLIGHT_BTN, 1000, true);

UITask ui_task(&board);
#endif
10 changes: 10 additions & 0 deletions variants/thinknode_m5/target-other.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#include <Arduino.h>
#include "target.h"

#ifdef DISPLAY_CLASS
DISPLAY_CLASS display;
MomentaryButton user_btn(PIN_USER_BTN, 1000, true);
MomentaryButton backlight_btn(BACKLIGHT_BTN, 1000, true);

UITask ui_task(board, display);
#endif
6 changes: 0 additions & 6 deletions variants/thinknode_m5/target.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,6 @@ EnvironmentSensorManager sensors = EnvironmentSensorManager(nmea);
EnvironmentSensorManager sensors = EnvironmentSensorManager();
#endif

#ifdef DISPLAY_CLASS
DISPLAY_CLASS display;
MomentaryButton user_btn(PIN_USER_BTN, 1000, true);
MomentaryButton backlight_btn(BACKLIGHT_BTN, 1000, true);
#endif

bool radio_init() {
fallback_clock.begin();
rtc_clock.begin(Wire);
Expand Down
2 changes: 2 additions & 0 deletions variants/thinknode_m5/target.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#ifdef DISPLAY_CLASS
#include <helpers/ui/GxEPDDisplay.h>
#include <helpers/ui/MomentaryButton.h>
#include <UITask.h>
#endif

extern ThinknodeM5Board board;
Expand All @@ -25,6 +26,7 @@ extern PCA9557 expander;
extern DISPLAY_CLASS display;
extern MomentaryButton user_btn;
extern MomentaryButton backlight_btn;
extern UITask ui_task;
#endif

bool radio_init();
Expand Down
Loading