* RAK_4631: ui-new
This commit is contained in:
@@ -116,10 +116,14 @@ void SerialBLEInterface::disable() {
|
|||||||
_isEnabled = false;
|
_isEnabled = false;
|
||||||
BLE_DEBUG_PRINTLN("SerialBLEInterface::disable");
|
BLE_DEBUG_PRINTLN("SerialBLEInterface::disable");
|
||||||
|
|
||||||
|
#ifdef RAK_BOARD
|
||||||
|
Bluefruit.disconnect(Bluefruit.connHandle());
|
||||||
|
#else
|
||||||
uint16_t conn_id;
|
uint16_t conn_id;
|
||||||
if (Bluefruit.getConnectedHandles(&conn_id, 1) > 0) {
|
if (Bluefruit.getConnectedHandles(&conn_id, 1) > 0) {
|
||||||
Bluefruit.disconnect(conn_id);
|
Bluefruit.disconnect(conn_id);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
Bluefruit.Advertising.restartOnDisconnect(false);
|
Bluefruit.Advertising.restartOnDisconnect(false);
|
||||||
Bluefruit.Advertising.stop();
|
Bluefruit.Advertising.stop();
|
||||||
|
|||||||
@@ -64,6 +64,7 @@ build_src_filter = ${rak4631.build_src_filter}
|
|||||||
extends = rak4631
|
extends = rak4631
|
||||||
build_flags =
|
build_flags =
|
||||||
${rak4631.build_flags}
|
${rak4631.build_flags}
|
||||||
|
-I examples/companion_radio/ui-new
|
||||||
-D PIN_USER_BTN=9
|
-D PIN_USER_BTN=9
|
||||||
-D PIN_USER_BTN_ANA=31
|
-D PIN_USER_BTN_ANA=31
|
||||||
-D DISPLAY_CLASS=SSD1306Display
|
-D DISPLAY_CLASS=SSD1306Display
|
||||||
@@ -73,7 +74,9 @@ build_flags =
|
|||||||
; NOTE: DO NOT ENABLE --> -D MESH_DEBUG=1
|
; NOTE: DO NOT ENABLE --> -D MESH_DEBUG=1
|
||||||
build_src_filter = ${rak4631.build_src_filter}
|
build_src_filter = ${rak4631.build_src_filter}
|
||||||
+<helpers/ui/SSD1306Display.cpp>
|
+<helpers/ui/SSD1306Display.cpp>
|
||||||
+<../examples/companion_radio>
|
+<helpers/ui/MomentaryButton.cpp>
|
||||||
|
+<../examples/companion_radio/*.cpp>
|
||||||
|
+<../examples/companion_radio/ui-new/*.cpp>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${rak4631.lib_deps}
|
${rak4631.lib_deps}
|
||||||
densaugeo/base64 @ ~1.4.0
|
densaugeo/base64 @ ~1.4.0
|
||||||
@@ -82,6 +85,7 @@ lib_deps =
|
|||||||
extends = rak4631
|
extends = rak4631
|
||||||
build_flags =
|
build_flags =
|
||||||
${rak4631.build_flags}
|
${rak4631.build_flags}
|
||||||
|
-I examples/companion_radio/ui-new
|
||||||
-D PIN_USER_BTN=9
|
-D PIN_USER_BTN=9
|
||||||
-D PIN_USER_BTN_ANA=31
|
-D PIN_USER_BTN_ANA=31
|
||||||
-D DISPLAY_CLASS=SSD1306Display
|
-D DISPLAY_CLASS=SSD1306Display
|
||||||
@@ -95,7 +99,9 @@ build_flags =
|
|||||||
build_src_filter = ${rak4631.build_src_filter}
|
build_src_filter = ${rak4631.build_src_filter}
|
||||||
+<helpers/ui/SSD1306Display.cpp>
|
+<helpers/ui/SSD1306Display.cpp>
|
||||||
+<helpers/nrf52/SerialBLEInterface.cpp>
|
+<helpers/nrf52/SerialBLEInterface.cpp>
|
||||||
+<../examples/companion_radio>
|
+<helpers/ui/MomentaryButton.cpp>
|
||||||
|
+<../examples/companion_radio/*.cpp>
|
||||||
|
+<../examples/companion_radio/ui-new/*.cpp>
|
||||||
lib_deps =
|
lib_deps =
|
||||||
${rak4631.lib_deps}
|
${rak4631.lib_deps}
|
||||||
densaugeo/base64 @ ~1.4.0
|
densaugeo/base64 @ ~1.4.0
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ RAK4631Board board;
|
|||||||
|
|
||||||
#ifdef DISPLAY_CLASS
|
#ifdef DISPLAY_CLASS
|
||||||
DISPLAY_CLASS display;
|
DISPLAY_CLASS display;
|
||||||
|
MomentaryButton user_btn(PIN_USER_BTN, 1000, true);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
RADIO_CLASS radio = new Module(P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY, SPI);
|
RADIO_CLASS radio = new Module(P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY, SPI);
|
||||||
|
|||||||
@@ -11,6 +11,8 @@
|
|||||||
#ifdef DISPLAY_CLASS
|
#ifdef DISPLAY_CLASS
|
||||||
#include <helpers/ui/SSD1306Display.h>
|
#include <helpers/ui/SSD1306Display.h>
|
||||||
extern DISPLAY_CLASS display;
|
extern DISPLAY_CLASS display;
|
||||||
|
#include <helpers/ui/MomentaryButton.h>
|
||||||
|
extern MomentaryButton user_btn;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern RAK4631Board board;
|
extern RAK4631Board board;
|
||||||
|
|||||||
Reference in New Issue
Block a user