Skip to content

Commit 022bfc4

Browse files
committed
Ikoka Stick: Use new UI, make repeater & room server work
* Enable the new UI on the BLE and USB Companion roles. * Fix compilation issues with the repeater and room server roles. * Remove ESP32-related alternate pinout cruft from the NRF build tree. * build.sh: add build-matching-firmwares command to allow e.g. building all roles for a given variant by passing the variant name.
1 parent 0359df6 commit 022bfc4

File tree

5 files changed

+25
-6
lines changed

5 files changed

+25
-6
lines changed

build.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
# usage
44
# sh build.sh build-firmware RAK_4631_Repeater
55
# sh build.sh build-firmwares
6+
# sh build.sh build-matching-firmwares RAK_4631
67
# sh build.sh build-companion-firmwares
78
# sh build.sh build-repeater-firmwares
89
# sh build.sh build-room-server-firmwares
@@ -144,6 +145,16 @@ mkdir -p out
144145
if [[ $1 == "build-firmware" ]]; then
145146
if [ "$2" ]; then
146147
build_firmware $2
148+
else
149+
echo "usage: $0 build-firmware <target>"
150+
exit 1
151+
fi
152+
elif [[ $1 == "build-matching-firmwares" ]]; then
153+
if [ "$2" ]; then
154+
build_all_firmwares_matching $2
155+
else
156+
echo "usage: $0 build-matching-firmwares <build-match-spec>"
157+
exit 1
147158
fi
148159
elif [[ $1 == "build-firmwares" ]]; then
149160
build_firmwares

variants/ikoka_stick_nrf/ikoka_stick_nrf_board.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ class ikoka_stick_nrf_board : public mesh::MainBoard {
2929

3030
#if defined(P_LORA_TX_LED)
3131
void onBeforeTransmit() override {
32-
digitalWrite(P_LORA_TX_LED, LOW); // turn TX LED on
32+
digitalWrite(P_LORA_TX_LED, HIGH); // turn TX LED on
3333
}
3434
void onAfterTransmit() override {
35-
digitalWrite(P_LORA_TX_LED, HIGH); // turn TX LED off
35+
digitalWrite(P_LORA_TX_LED, LOW); // turn TX LED off
3636
}
3737
#endif
3838

variants/ikoka_stick_nrf/platformio.ini

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ build_flags = ${nrf52840_xiao.build_flags}
5555
build_src_filter = ${nrf52840_xiao.build_src_filter}
5656
+<helpers/*.cpp>
5757
+<helpers/sensors>
58+
+<helpers/ui/MomentaryButton.cpp>
5859
+<helpers/ui/SSD1306Display.cpp>
5960
+<../variants/ikoka_stick_nrf>
6061
debug_tool = jlink
@@ -68,12 +69,14 @@ build_flags =
6869
-D MAX_GROUP_CHANNELS=8
6970
-D BLE_PIN_CODE=123456
7071
-D OFFLINE_QUEUE_SIZE=256
72+
-I examples/companion_radio/ui-new
7173
; -D BLE_DEBUG_LOGGING=1
7274
; -D MESH_PACKET_LOGGING=1
7375
; -D MESH_DEBUG=1
7476
build_src_filter = ${ikoka_stick_nrf.build_src_filter}
7577
+<helpers/nrf52/SerialBLEInterface.cpp>
76-
+<../examples/companion_radio>
78+
+<../examples/companion_radio/*.cpp>
79+
+<../examples/companion_radio/ui-new/*.cpp>
7780
lib_deps =
7881
${ikoka_stick_nrf.lib_deps}
7982
densaugeo/base64 @ ~1.4.0
@@ -84,11 +87,13 @@ build_flags =
8487
${ikoka_stick_nrf.build_flags}
8588
-D MAX_CONTACTS=100
8689
-D MAX_GROUP_CHANNELS=8
90+
-I examples/companion_radio/ui-new
8791
; -D MESH_PACKET_LOGGING=1
8892
; -D MESH_DEBUG=1
8993
build_src_filter = ${ikoka_stick_nrf.build_src_filter}
9094
+<helpers/nrf52/SerialBLEInterface.cpp>
91-
+<../examples/companion_radio>
95+
+<../examples/companion_radio/*.cpp>
96+
+<../examples/companion_radio/ui-new/*.cpp>
9297
lib_deps =
9398
${ikoka_stick_nrf.lib_deps}
9499
densaugeo/base64 @ ~1.4.0
@@ -106,7 +111,7 @@ build_flags =
106111
; -D MESH_DEBUG=1
107112
build_src_filter = ${ikoka_stick_nrf.build_src_filter}
108113
+<helpers/ui/SSD1306Display.cpp>
109-
+<../examples/simple_repeater>
114+
+<../examples/simple_repeater/*.cpp>
110115

111116
[env:ikoka_stick_nrf_room_server]
112117
extends = ikoka_stick_nrf
@@ -119,4 +124,4 @@ build_flags =
119124
; -D MESH_PACKET_LOGGING=1
120125
; -D MESH_DEBUG=1
121126
build_src_filter = ${ikoka_stick_nrf.build_src_filter}
122-
+<../examples/simple_room_server>
127+
+<../examples/simple_room_server/*.cpp>

variants/ikoka_stick_nrf/target.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ ikoka_stick_nrf_board board;
66

77
#ifdef DISPLAY_CLASS
88
DISPLAY_CLASS display;
9+
MomentaryButton user_btn(PIN_USER_BTN, 1000, true);
910
#endif
1011

1112
RADIO_CLASS radio = new Module(P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY, SPI);

variants/ikoka_stick_nrf/target.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111

1212
#ifdef DISPLAY_CLASS
1313
#include <helpers/ui/SSD1306Display.h>
14+
#include <helpers/ui/MomentaryButton.h>
1415
extern DISPLAY_CLASS display;
16+
extern MomentaryButton user_btn;
1517
#endif
1618

1719
extern ikoka_stick_nrf_board board;

0 commit comments

Comments
 (0)