mirror of
https://github.com/meshtastic/firmware.git
synced 2025-09-27 11:31:47 +00:00
Merge branch 'master' into rak_wismeshtag
This commit is contained in:
commit
aa68314d18
2
.github/workflows/test_native.yml
vendored
2
.github/workflows/test_native.yml
vendored
@ -143,7 +143,7 @@ jobs:
|
|||||||
merge-multiple: true
|
merge-multiple: true
|
||||||
|
|
||||||
- name: Test Report
|
- name: Test Report
|
||||||
uses: dorny/test-reporter@v2.1.0
|
uses: dorny/test-reporter@v2.1.1
|
||||||
with:
|
with:
|
||||||
name: PlatformIO Tests
|
name: PlatformIO Tests
|
||||||
path: testreport.xml
|
path: testreport.xml
|
||||||
|
@ -8,8 +8,8 @@ plugins:
|
|||||||
uri: https://github.com/trunk-io/plugins
|
uri: https://github.com/trunk-io/plugins
|
||||||
lint:
|
lint:
|
||||||
enabled:
|
enabled:
|
||||||
- checkov@3.2.447
|
- checkov@3.2.450
|
||||||
- renovate@41.23.4
|
- renovate@41.29.1
|
||||||
- prettier@3.6.2
|
- prettier@3.6.2
|
||||||
- trufflehog@3.89.2
|
- trufflehog@3.89.2
|
||||||
- yamllint@1.37.1
|
- yamllint@1.37.1
|
||||||
|
52
bin/config.d/lora-ws-raspberry-pico-to-orangepi-03.yaml
Normal file
52
bin/config.d/lora-ws-raspberry-pico-to-orangepi-03.yaml
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
# https://www.waveshare.com/pico-lora-sx1262-868m.htm
|
||||||
|
# http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/details/Orange-Pi-Zero-3.html
|
||||||
|
#
|
||||||
|
# See Orange Pi Zero3 manual, chapter 3.16, page 124 for 26-pin header pinout
|
||||||
|
#
|
||||||
|
# Pin Connection
|
||||||
|
# Waveshare Orange Pi Zero3
|
||||||
|
# 36 3.3V 17
|
||||||
|
# 15 MOSI 19
|
||||||
|
# 16 MISO 21
|
||||||
|
# 14 CLK 23
|
||||||
|
# 38 GND 25
|
||||||
|
# 4 BUSY 18
|
||||||
|
# 20 RESET 22
|
||||||
|
# 5 CS 24
|
||||||
|
# 26 DIO1/IRQ 26
|
||||||
|
|
||||||
|
Lora:
|
||||||
|
Module: sx1262 # Waveshare Raspberry Pico Lora module
|
||||||
|
DIO2_AS_RF_SWITCH: true
|
||||||
|
DIO3_TCXO_VOLTAGE: true
|
||||||
|
# Specify either the spidev1_1 or the CS below, not both!
|
||||||
|
# On DietPi Linux, when using the user overlay dietpi-spi1_1.dtbo, CS will be configured with spidev1.1
|
||||||
|
spidev: spidev1.1 # See Orange Pi Zero3 manual, chapter 3.18.3, page 130
|
||||||
|
# CS: # CS PIN_24 -> chip 1, line 233
|
||||||
|
# pin: 24
|
||||||
|
# gpiochip: 1
|
||||||
|
# line: 233
|
||||||
|
SCK: # SCK PIN_23 -> chip 1, line 230
|
||||||
|
pin: 23
|
||||||
|
gpiochip: 1
|
||||||
|
line: 230
|
||||||
|
Busy: # BUSY PIN_18 -> chip 1, line 78
|
||||||
|
pin: 18
|
||||||
|
gpiochip: 1
|
||||||
|
line: 78
|
||||||
|
MOSI: # MOSI PIN_19 -> chip 1, line 231
|
||||||
|
pin: 19
|
||||||
|
gpiochip: 1
|
||||||
|
line: 231
|
||||||
|
MISO: # MISO PIN_21 -> chip 1, line 232
|
||||||
|
pin: 21
|
||||||
|
gpiochip: 1
|
||||||
|
line: 232
|
||||||
|
Reset: # NRST PIN_22 -> chip 1, line 71
|
||||||
|
pin: 22
|
||||||
|
gpiochip: 1
|
||||||
|
line: 71
|
||||||
|
IRQ: # DIO1 PIN_26 -> chip 1, line 74
|
||||||
|
pin: 26
|
||||||
|
gpiochip: 1
|
||||||
|
line: 74
|
@ -87,6 +87,9 @@
|
|||||||
</screenshots>
|
</screenshots>
|
||||||
|
|
||||||
<releases>
|
<releases>
|
||||||
|
<release version="2.7.3" date="2025-07-10">
|
||||||
|
<url type="details">https://github.com/meshtastic/firmware/releases?q=tag%3Av2.7.3</url>
|
||||||
|
</release>
|
||||||
<release version="2.7.2" date="2025-07-04">
|
<release version="2.7.2" date="2025-07-04">
|
||||||
<url type="details">https://github.com/meshtastic/firmware/releases?q=tag%3Av2.7.2</url>
|
<url type="details">https://github.com/meshtastic/firmware/releases?q=tag%3Av2.7.2</url>
|
||||||
</release>
|
</release>
|
||||||
|
7
debian/changelog
vendored
7
debian/changelog
vendored
@ -1,4 +1,4 @@
|
|||||||
meshtasticd (2.7.2.0) UNRELEASED; urgency=medium
|
meshtasticd (2.7.3.0) UNRELEASED; urgency=medium
|
||||||
|
|
||||||
[ Austin Lane ]
|
[ Austin Lane ]
|
||||||
* Initial packaging
|
* Initial packaging
|
||||||
@ -28,4 +28,7 @@ meshtasticd (2.7.2.0) UNRELEASED; urgency=medium
|
|||||||
[ ]
|
[ ]
|
||||||
* GitHub Actions Automatic version bump
|
* GitHub Actions Automatic version bump
|
||||||
|
|
||||||
-- <github-actions[bot]@users.noreply.github.com> Fri, 04 Jul 2025 11:58:01 +0000
|
[ Ubuntu ]
|
||||||
|
* GitHub Actions Automatic version bump
|
||||||
|
|
||||||
|
-- Ubuntu <github-actions[bot]@users.noreply.github.com> Thu, 10 Jul 2025 16:29:27 +0000
|
||||||
|
@ -104,18 +104,18 @@ lib_deps =
|
|||||||
[radiolib_base]
|
[radiolib_base]
|
||||||
lib_deps =
|
lib_deps =
|
||||||
# renovate: datasource=custom.pio depName=RadioLib packageName=jgromes/library/RadioLib
|
# renovate: datasource=custom.pio depName=RadioLib packageName=jgromes/library/RadioLib
|
||||||
jgromes/RadioLib@7.2.0
|
jgromes/RadioLib@7.2.1
|
||||||
|
|
||||||
[device-ui_base]
|
[device-ui_base]
|
||||||
lib_deps =
|
lib_deps =
|
||||||
# renovate: datasource=git-refs depName=meshtastic/device-ui packageName=https://github.com/meshtastic/device-ui gitBranch=master
|
# renovate: datasource=git-refs depName=meshtastic/device-ui packageName=https://github.com/meshtastic/device-ui gitBranch=master
|
||||||
https://github.com/meshtastic/device-ui/archive/8c7092c73425adfda1aac8c6960df06cd85f6d92.zip
|
https://github.com/meshtastic/device-ui/archive/404c6e06ecfda8dd2dc9e6d5fe417ae028f8029f.zip
|
||||||
|
|
||||||
; Common libs for environmental measurements in telemetry module
|
; Common libs for environmental measurements in telemetry module
|
||||||
[environmental_base]
|
[environmental_base]
|
||||||
lib_deps =
|
lib_deps =
|
||||||
# renovate: datasource=custom.pio depName=Adafruit BusIO packageName=adafruit/library/Adafruit BusIO
|
# renovate: datasource=custom.pio depName=Adafruit BusIO packageName=adafruit/library/Adafruit BusIO
|
||||||
adafruit/Adafruit BusIO@1.17.1
|
adafruit/Adafruit BusIO@1.17.2
|
||||||
# renovate: datasource=custom.pio depName=Adafruit Unified Sensor packageName=adafruit/library/Adafruit Unified Sensor
|
# renovate: datasource=custom.pio depName=Adafruit Unified Sensor packageName=adafruit/library/Adafruit Unified Sensor
|
||||||
adafruit/Adafruit Unified Sensor@1.1.15
|
adafruit/Adafruit Unified Sensor@1.1.15
|
||||||
# renovate: datasource=custom.pio depName=Adafruit BMP280 packageName=adafruit/library/Adafruit BMP280 Library
|
# renovate: datasource=custom.pio depName=Adafruit BMP280 packageName=adafruit/library/Adafruit BMP280 Library
|
||||||
|
@ -21,6 +21,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
#include "Screen.h"
|
#include "Screen.h"
|
||||||
|
#include "NodeDB.h"
|
||||||
#include "PowerMon.h"
|
#include "PowerMon.h"
|
||||||
#include "Throttle.h"
|
#include "Throttle.h"
|
||||||
#include "configuration.h"
|
#include "configuration.h"
|
||||||
@ -44,7 +45,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#endif
|
#endif
|
||||||
#include "FSCommon.h"
|
#include "FSCommon.h"
|
||||||
#include "MeshService.h"
|
#include "MeshService.h"
|
||||||
#include "NodeDB.h"
|
|
||||||
#include "RadioLibInterface.h"
|
#include "RadioLibInterface.h"
|
||||||
#include "error.h"
|
#include "error.h"
|
||||||
#include "gps/GeoCoord.h"
|
#include "gps/GeoCoord.h"
|
||||||
@ -1257,6 +1257,10 @@ int Screen::handleTextMessage(const meshtastic_MeshPacket *packet)
|
|||||||
devicestate.has_rx_text_message = true; // Needed to include the message frame
|
devicestate.has_rx_text_message = true; // Needed to include the message frame
|
||||||
hasUnreadMessage = true; // Enables mail icon in the header
|
hasUnreadMessage = true; // Enables mail icon in the header
|
||||||
setFrames(FOCUS_PRESERVE); // Refresh frame list without switching view
|
setFrames(FOCUS_PRESERVE); // Refresh frame list without switching view
|
||||||
|
|
||||||
|
// Only wake/force display if the configuration allows it
|
||||||
|
if (shouldWakeOnReceivedMessage()) {
|
||||||
|
setOn(true); // Wake up the screen first
|
||||||
forceDisplay(); // Forces screen redraw
|
forceDisplay(); // Forces screen redraw
|
||||||
|
|
||||||
// === Prepare banner content ===
|
// === Prepare banner content ===
|
||||||
@ -1293,6 +1297,7 @@ int Screen::handleTextMessage(const meshtastic_MeshPacket *packet)
|
|||||||
screen->showSimpleBanner(banner, 3000);
|
screen->showSimpleBanner(banner, 3000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -1423,3 +1428,23 @@ bool Screen::isOverlayBannerShowing()
|
|||||||
#else
|
#else
|
||||||
graphics::Screen::Screen(ScanI2C::DeviceAddress, meshtastic_Config_DisplayConfig_OledType, OLEDDISPLAY_GEOMETRY) {}
|
graphics::Screen::Screen(ScanI2C::DeviceAddress, meshtastic_Config_DisplayConfig_OledType, OLEDDISPLAY_GEOMETRY) {}
|
||||||
#endif // HAS_SCREEN
|
#endif // HAS_SCREEN
|
||||||
|
|
||||||
|
bool shouldWakeOnReceivedMessage()
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
The goal here is to determine when we do NOT wake up the screen on message received:
|
||||||
|
- Any ext. notifications are turned on
|
||||||
|
- If role is not client / client_mute
|
||||||
|
- If the battery level is very low
|
||||||
|
*/
|
||||||
|
if (moduleConfig.external_notification.enabled) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!meshtastic_Config_DeviceConfig_Role_CLIENT && !meshtastic_Config_DeviceConfig_Role_CLIENT_MUTE) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (powerStatus && powerStatus->getBatteryChargePercent() < 10) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
@ -26,6 +26,8 @@ struct BannerOverlayOptions {
|
|||||||
};
|
};
|
||||||
} // namespace graphics
|
} // namespace graphics
|
||||||
|
|
||||||
|
bool shouldWakeOnReceivedMessage();
|
||||||
|
|
||||||
#if !HAS_SCREEN
|
#if !HAS_SCREEN
|
||||||
#include "power.h"
|
#include "power.h"
|
||||||
namespace graphics
|
namespace graphics
|
||||||
|
@ -129,11 +129,11 @@ void menuHandler::ClockFacePicker()
|
|||||||
screen->runNow();
|
screen->runNow();
|
||||||
} else if (selected == Digital) {
|
} else if (selected == Digital) {
|
||||||
uiconfig.is_clockface_analog = false;
|
uiconfig.is_clockface_analog = false;
|
||||||
nodeDB->saveProto("/prefs/uiconfig.proto", meshtastic_DeviceUIConfig_size, &meshtastic_DeviceUIConfig_msg, &uiconfig);
|
saveUIConfig();
|
||||||
screen->setFrames(Screen::FOCUS_CLOCK);
|
screen->setFrames(Screen::FOCUS_CLOCK);
|
||||||
} else {
|
} else {
|
||||||
uiconfig.is_clockface_analog = true;
|
uiconfig.is_clockface_analog = true;
|
||||||
nodeDB->saveProto("/prefs/uiconfig.proto", meshtastic_DeviceUIConfig_size, &meshtastic_DeviceUIConfig_msg, &uiconfig);
|
saveUIConfig();
|
||||||
screen->setFrames(Screen::FOCUS_CLOCK);
|
screen->setFrames(Screen::FOCUS_CLOCK);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -346,37 +346,28 @@ void menuHandler::homeBaseMenu()
|
|||||||
|
|
||||||
void menuHandler::systemBaseMenu()
|
void menuHandler::systemBaseMenu()
|
||||||
{
|
{
|
||||||
|
|
||||||
// Check if brightness is supported
|
// Check if brightness is supported
|
||||||
bool hasSupportBrightness = false;
|
bool hasSupportBrightness = false;
|
||||||
#if defined(ST7789_CS) || defined(USE_OLED) || defined(USE_SSD1306) || defined(USE_SH1106) || defined(USE_SH1107) || HAS_TFT
|
#if defined(ST7789_CS) || defined(USE_OLED) || defined(USE_SSD1306) || defined(USE_SH1106) || defined(USE_SH1107) || HAS_TFT
|
||||||
hasSupportBrightness = true;
|
hasSupportBrightness = true;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
enum optionsNumbers { Back, Beeps, Brightness, Reboot, Color, MUI, Test, enumEnd };
|
enum optionsNumbers { Back, Notifications, ScreenOptions, PowerMenu, Test, enumEnd };
|
||||||
static const char *optionsArray[enumEnd] = {"Back"};
|
static const char *optionsArray[enumEnd] = {"Back"};
|
||||||
static int optionsEnumArray[enumEnd] = {Back};
|
static int optionsEnumArray[enumEnd] = {Back};
|
||||||
int options = 1;
|
int options = 1;
|
||||||
|
|
||||||
optionsArray[options] = "Reboot";
|
optionsArray[options] = "Notifications";
|
||||||
optionsEnumArray[options++] = Reboot;
|
optionsEnumArray[options++] = Notifications;
|
||||||
|
#if defined(ST7789_CS) || defined(USE_OLED) || defined(USE_SSD1306) || defined(USE_SH1106) || defined(USE_SH1107) || \
|
||||||
optionsArray[options] = "Beeps Action";
|
defined(HELTEC_MESH_NODE_T114) || defined(HELTEC_VISION_MASTER_T190) || HAS_TFT
|
||||||
optionsEnumArray[options++] = Beeps;
|
optionsArray[options] = "Screen Options";
|
||||||
|
optionsEnumArray[options++] = ScreenOptions;
|
||||||
if (hasSupportBrightness) {
|
|
||||||
optionsArray[options] = "Brightness";
|
|
||||||
optionsEnumArray[options++] = Brightness;
|
|
||||||
}
|
|
||||||
|
|
||||||
#if defined(HELTEC_MESH_NODE_T114) || defined(HELTEC_VISION_MASTER_T190) || HAS_TFT
|
|
||||||
optionsArray[options] = "Screen Color";
|
|
||||||
optionsEnumArray[options++] = Color;
|
|
||||||
#endif
|
|
||||||
#if HAS_TFT
|
|
||||||
optionsArray[options] = "Switch to MUI";
|
|
||||||
optionsEnumArray[options++] = MUI;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
optionsArray[options] = "Reboot/Shutdown";
|
||||||
|
optionsEnumArray[options++] = PowerMenu;
|
||||||
|
|
||||||
if (test_enabled) {
|
if (test_enabled) {
|
||||||
optionsArray[options] = "Test Menu";
|
optionsArray[options] = "Test Menu";
|
||||||
optionsEnumArray[options++] = Test;
|
optionsEnumArray[options++] = Test;
|
||||||
@ -388,20 +379,14 @@ void menuHandler::systemBaseMenu()
|
|||||||
bannerOptions.optionsCount = options;
|
bannerOptions.optionsCount = options;
|
||||||
bannerOptions.optionsEnumPtr = optionsEnumArray;
|
bannerOptions.optionsEnumPtr = optionsEnumArray;
|
||||||
bannerOptions.bannerCallback = [](int selected) -> void {
|
bannerOptions.bannerCallback = [](int selected) -> void {
|
||||||
if (selected == Beeps) {
|
if (selected == Notifications) {
|
||||||
menuHandler::menuQueue = menuHandler::buzzermodemenupicker;
|
menuHandler::menuQueue = menuHandler::notifications_menu;
|
||||||
screen->runNow();
|
screen->runNow();
|
||||||
} else if (selected == Brightness) {
|
} else if (selected == ScreenOptions) {
|
||||||
menuHandler::menuQueue = menuHandler::brightness_picker;
|
menuHandler::menuQueue = menuHandler::screen_options_menu;
|
||||||
screen->runNow();
|
screen->runNow();
|
||||||
} else if (selected == Reboot) {
|
} else if (selected == PowerMenu) {
|
||||||
menuHandler::menuQueue = menuHandler::reboot_menu;
|
menuHandler::menuQueue = menuHandler::power_menu;
|
||||||
screen->runNow();
|
|
||||||
} else if (selected == MUI) {
|
|
||||||
menuHandler::menuQueue = menuHandler::mui_picker;
|
|
||||||
screen->runNow();
|
|
||||||
} else if (selected == Color) {
|
|
||||||
menuHandler::menuQueue = menuHandler::tftcolormenupicker;
|
|
||||||
screen->runNow();
|
screen->runNow();
|
||||||
} else if (selected == Test) {
|
} else if (selected == Test) {
|
||||||
menuHandler::menuQueue = menuHandler::test_menu;
|
menuHandler::menuQueue = menuHandler::test_menu;
|
||||||
@ -533,22 +518,19 @@ void menuHandler::compassNorthMenu()
|
|||||||
if (selected == Dynamic) {
|
if (selected == Dynamic) {
|
||||||
if (uiconfig.compass_mode != meshtastic_CompassMode_DYNAMIC) {
|
if (uiconfig.compass_mode != meshtastic_CompassMode_DYNAMIC) {
|
||||||
uiconfig.compass_mode = meshtastic_CompassMode_DYNAMIC;
|
uiconfig.compass_mode = meshtastic_CompassMode_DYNAMIC;
|
||||||
nodeDB->saveProto("/prefs/uiconfig.proto", meshtastic_DeviceUIConfig_size, &meshtastic_DeviceUIConfig_msg,
|
saveUIConfig();
|
||||||
&uiconfig);
|
|
||||||
screen->setFrames(graphics::Screen::FOCUS_PRESERVE);
|
screen->setFrames(graphics::Screen::FOCUS_PRESERVE);
|
||||||
}
|
}
|
||||||
} else if (selected == Fixed) {
|
} else if (selected == Fixed) {
|
||||||
if (uiconfig.compass_mode != meshtastic_CompassMode_FIXED_RING) {
|
if (uiconfig.compass_mode != meshtastic_CompassMode_FIXED_RING) {
|
||||||
uiconfig.compass_mode = meshtastic_CompassMode_FIXED_RING;
|
uiconfig.compass_mode = meshtastic_CompassMode_FIXED_RING;
|
||||||
nodeDB->saveProto("/prefs/uiconfig.proto", meshtastic_DeviceUIConfig_size, &meshtastic_DeviceUIConfig_msg,
|
saveUIConfig();
|
||||||
&uiconfig);
|
|
||||||
screen->setFrames(graphics::Screen::FOCUS_PRESERVE);
|
screen->setFrames(graphics::Screen::FOCUS_PRESERVE);
|
||||||
}
|
}
|
||||||
} else if (selected == Freeze) {
|
} else if (selected == Freeze) {
|
||||||
if (uiconfig.compass_mode != meshtastic_CompassMode_FREEZE_HEADING) {
|
if (uiconfig.compass_mode != meshtastic_CompassMode_FREEZE_HEADING) {
|
||||||
uiconfig.compass_mode = meshtastic_CompassMode_FREEZE_HEADING;
|
uiconfig.compass_mode = meshtastic_CompassMode_FREEZE_HEADING;
|
||||||
nodeDB->saveProto("/prefs/uiconfig.proto", meshtastic_DeviceUIConfig_size, &meshtastic_DeviceUIConfig_msg,
|
saveUIConfig();
|
||||||
&uiconfig);
|
|
||||||
screen->setFrames(graphics::Screen::FOCUS_PRESERVE);
|
screen->setFrames(graphics::Screen::FOCUS_PRESERVE);
|
||||||
}
|
}
|
||||||
} else if (selected == Back) {
|
} else if (selected == Back) {
|
||||||
@ -610,7 +592,7 @@ void menuHandler::BuzzerModeMenu()
|
|||||||
{
|
{
|
||||||
static const char *optionsArray[] = {"All Enabled", "Disabled", "Notifications", "System Only"};
|
static const char *optionsArray[] = {"All Enabled", "Disabled", "Notifications", "System Only"};
|
||||||
BannerOverlayOptions bannerOptions;
|
BannerOverlayOptions bannerOptions;
|
||||||
bannerOptions.message = "Beep Action";
|
bannerOptions.message = "Buzzer Mode";
|
||||||
bannerOptions.optionsArrayPtr = optionsArray;
|
bannerOptions.optionsArrayPtr = optionsArray;
|
||||||
bannerOptions.optionsCount = 4;
|
bannerOptions.optionsCount = 4;
|
||||||
bannerOptions.bannerCallback = [](int selected) -> void {
|
bannerOptions.bannerCallback = [](int selected) -> void {
|
||||||
@ -660,7 +642,7 @@ void menuHandler::BrightnessPickerMenu()
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Save to device
|
// Save to device
|
||||||
nodeDB->saveProto("/prefs/uiconfig.proto", meshtastic_DeviceUIConfig_size, &meshtastic_DeviceUIConfig_msg, &uiconfig);
|
saveUIConfig();
|
||||||
|
|
||||||
LOG_INFO("Screen brightness set to %d", uiconfig.screen_brightness);
|
LOG_INFO("Screen brightness set to %d", uiconfig.screen_brightness);
|
||||||
}
|
}
|
||||||
@ -671,13 +653,13 @@ void menuHandler::BrightnessPickerMenu()
|
|||||||
|
|
||||||
void menuHandler::switchToMUIMenu()
|
void menuHandler::switchToMUIMenu()
|
||||||
{
|
{
|
||||||
static const char *optionsArray[] = {"Yes", "No"};
|
static const char *optionsArray[] = {"No", "Yes"};
|
||||||
BannerOverlayOptions bannerOptions;
|
BannerOverlayOptions bannerOptions;
|
||||||
bannerOptions.message = "Switch to MUI?";
|
bannerOptions.message = "Switch to MUI?";
|
||||||
bannerOptions.optionsArrayPtr = optionsArray;
|
bannerOptions.optionsArrayPtr = optionsArray;
|
||||||
bannerOptions.optionsCount = 2;
|
bannerOptions.optionsCount = 2;
|
||||||
bannerOptions.bannerCallback = [](int selected) -> void {
|
bannerOptions.bannerCallback = [](int selected) -> void {
|
||||||
if (selected == 0) {
|
if (selected == 1) {
|
||||||
config.display.displaymode = meshtastic_Config_DisplayConfig_DisplayMode_COLOR;
|
config.display.displaymode = meshtastic_Config_DisplayConfig_DisplayMode_COLOR;
|
||||||
config.bluetooth.enabled = false;
|
config.bluetooth.enabled = false;
|
||||||
service->reloadConfig(SEGMENT_CONFIG);
|
service->reloadConfig(SEGMENT_CONFIG);
|
||||||
@ -742,6 +724,9 @@ void menuHandler::TFTColorPickerMenu(OLEDDisplay *display)
|
|||||||
TFT_MESH_r = 255;
|
TFT_MESH_r = 255;
|
||||||
TFT_MESH_g = 255;
|
TFT_MESH_g = 255;
|
||||||
TFT_MESH_b = 255;
|
TFT_MESH_b = 255;
|
||||||
|
} else {
|
||||||
|
menuQueue = system_base_menu;
|
||||||
|
screen->runNow();
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(HELTEC_MESH_NODE_T114) || defined(HELTEC_VISION_MASTER_T190) || HAS_TFT
|
#if defined(HELTEC_MESH_NODE_T114) || defined(HELTEC_VISION_MASTER_T190) || HAS_TFT
|
||||||
@ -771,7 +756,7 @@ void menuHandler::TFTColorPickerMenu(OLEDDisplay *display)
|
|||||||
uiconfig.screen_rgb_color = (TFT_MESH_r << 16) | (TFT_MESH_g << 8) | TFT_MESH_b;
|
uiconfig.screen_rgb_color = (TFT_MESH_r << 16) | (TFT_MESH_g << 8) | TFT_MESH_b;
|
||||||
}
|
}
|
||||||
LOG_INFO("Storing Value of %d to uiconfig.screen_rgb_color", uiconfig.screen_rgb_color);
|
LOG_INFO("Storing Value of %d to uiconfig.screen_rgb_color", uiconfig.screen_rgb_color);
|
||||||
nodeDB->saveProto("/prefs/uiconfig.proto", meshtastic_DeviceUIConfig_size, &meshtastic_DeviceUIConfig_msg, &uiconfig);
|
saveUIConfig();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
@ -790,6 +775,29 @@ void menuHandler::rebootMenu()
|
|||||||
IF_SCREEN(screen->showSimpleBanner("Rebooting...", 0));
|
IF_SCREEN(screen->showSimpleBanner("Rebooting...", 0));
|
||||||
nodeDB->saveToDisk();
|
nodeDB->saveToDisk();
|
||||||
rebootAtMsec = millis() + DEFAULT_REBOOT_SECONDS * 1000;
|
rebootAtMsec = millis() + DEFAULT_REBOOT_SECONDS * 1000;
|
||||||
|
} else {
|
||||||
|
menuQueue = power_menu;
|
||||||
|
screen->runNow();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
screen->showOverlayBanner(bannerOptions);
|
||||||
|
}
|
||||||
|
|
||||||
|
void menuHandler::shutdownMenu()
|
||||||
|
{
|
||||||
|
static const char *optionsArray[] = {"Back", "Confirm"};
|
||||||
|
BannerOverlayOptions bannerOptions;
|
||||||
|
bannerOptions.message = "Shutdown Device?";
|
||||||
|
bannerOptions.optionsArrayPtr = optionsArray;
|
||||||
|
bannerOptions.optionsCount = 2;
|
||||||
|
bannerOptions.bannerCallback = [](int selected) -> void {
|
||||||
|
if (selected == 1) {
|
||||||
|
IF_SCREEN(screen->showSimpleBanner("Shutting Down...", 0));
|
||||||
|
nodeDB->saveToDisk();
|
||||||
|
power->shutdown();
|
||||||
|
} else {
|
||||||
|
menuQueue = power_menu;
|
||||||
|
screen->runNow();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
screen->showOverlayBanner(bannerOptions);
|
screen->showOverlayBanner(bannerOptions);
|
||||||
@ -888,6 +896,117 @@ void menuHandler::wifiToggleMenu()
|
|||||||
screen->showOverlayBanner(bannerOptions);
|
screen->showOverlayBanner(bannerOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void menuHandler::notificationsMenu()
|
||||||
|
{
|
||||||
|
enum optionsNumbers { Back, BuzzerActions };
|
||||||
|
static const char *optionsArray[] = {"Back", "Buzzer Actions"};
|
||||||
|
static int optionsEnumArray[] = {Back, BuzzerActions};
|
||||||
|
int options = 2;
|
||||||
|
|
||||||
|
BannerOverlayOptions bannerOptions;
|
||||||
|
bannerOptions.message = "Notifications";
|
||||||
|
bannerOptions.optionsArrayPtr = optionsArray;
|
||||||
|
bannerOptions.optionsCount = options;
|
||||||
|
bannerOptions.optionsEnumPtr = optionsEnumArray;
|
||||||
|
bannerOptions.bannerCallback = [](int selected) -> void {
|
||||||
|
if (selected == BuzzerActions) {
|
||||||
|
menuHandler::menuQueue = menuHandler::buzzermodemenupicker;
|
||||||
|
screen->runNow();
|
||||||
|
} else {
|
||||||
|
menuQueue = system_base_menu;
|
||||||
|
screen->runNow();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
screen->showOverlayBanner(bannerOptions);
|
||||||
|
}
|
||||||
|
|
||||||
|
void menuHandler::screenOptionsMenu()
|
||||||
|
{
|
||||||
|
// Check if brightness is supported
|
||||||
|
bool hasSupportBrightness = false;
|
||||||
|
#if defined(ST7789_CS) || defined(USE_OLED) || defined(USE_SSD1306) || defined(USE_SH1106) || defined(USE_SH1107) || HAS_TFT
|
||||||
|
hasSupportBrightness = true;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
enum optionsNumbers { Back, Brightness, ScreenColor };
|
||||||
|
static const char *optionsArray[4] = {"Back"};
|
||||||
|
static int optionsEnumArray[4] = {Back};
|
||||||
|
int options = 1;
|
||||||
|
|
||||||
|
// Only show brightness for B&W displays
|
||||||
|
if (hasSupportBrightness && !HAS_TFT) {
|
||||||
|
optionsArray[options] = "Brightness";
|
||||||
|
optionsEnumArray[options++] = Brightness;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Only show screen color for TFT displays
|
||||||
|
#if defined(HELTEC_MESH_NODE_T114) || defined(HELTEC_VISION_MASTER_T190) || HAS_TFT
|
||||||
|
optionsArray[options] = "Screen Color";
|
||||||
|
optionsEnumArray[options++] = ScreenColor;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
BannerOverlayOptions bannerOptions;
|
||||||
|
bannerOptions.message = "Screen Options";
|
||||||
|
bannerOptions.optionsArrayPtr = optionsArray;
|
||||||
|
bannerOptions.optionsCount = options;
|
||||||
|
bannerOptions.optionsEnumPtr = optionsEnumArray;
|
||||||
|
bannerOptions.bannerCallback = [](int selected) -> void {
|
||||||
|
if (selected == Brightness) {
|
||||||
|
menuHandler::menuQueue = menuHandler::brightness_picker;
|
||||||
|
screen->runNow();
|
||||||
|
} else if (selected == ScreenColor) {
|
||||||
|
menuHandler::menuQueue = menuHandler::tftcolormenupicker;
|
||||||
|
screen->runNow();
|
||||||
|
} else {
|
||||||
|
menuQueue = system_base_menu;
|
||||||
|
screen->runNow();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
screen->showOverlayBanner(bannerOptions);
|
||||||
|
}
|
||||||
|
|
||||||
|
void menuHandler::powerMenu()
|
||||||
|
{
|
||||||
|
|
||||||
|
enum optionsNumbers { Back, Reboot, Shutdown, MUI };
|
||||||
|
static const char *optionsArray[4] = {"Back"};
|
||||||
|
static int optionsEnumArray[4] = {Back};
|
||||||
|
int options = 1;
|
||||||
|
|
||||||
|
optionsArray[options] = "Reboot";
|
||||||
|
optionsEnumArray[options++] = Reboot;
|
||||||
|
|
||||||
|
optionsArray[options] = "Shutdown";
|
||||||
|
optionsEnumArray[options++] = Shutdown;
|
||||||
|
|
||||||
|
#if HAS_TFT
|
||||||
|
optionsArray[options] = "Switch to MUI";
|
||||||
|
optionsEnumArray[options++] = MUI;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
BannerOverlayOptions bannerOptions;
|
||||||
|
bannerOptions.message = "Reboot / Shutdown";
|
||||||
|
bannerOptions.optionsArrayPtr = optionsArray;
|
||||||
|
bannerOptions.optionsCount = options;
|
||||||
|
bannerOptions.optionsEnumPtr = optionsEnumArray;
|
||||||
|
bannerOptions.bannerCallback = [](int selected) -> void {
|
||||||
|
if (selected == Reboot) {
|
||||||
|
menuHandler::menuQueue = menuHandler::reboot_menu;
|
||||||
|
screen->runNow();
|
||||||
|
} else if (selected == Shutdown) {
|
||||||
|
menuHandler::menuQueue = menuHandler::shutdown_menu;
|
||||||
|
screen->runNow();
|
||||||
|
} else if (selected == MUI) {
|
||||||
|
menuHandler::menuQueue = menuHandler::mui_picker;
|
||||||
|
screen->runNow();
|
||||||
|
} else {
|
||||||
|
menuQueue = system_base_menu;
|
||||||
|
screen->runNow();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
screen->showOverlayBanner(bannerOptions);
|
||||||
|
}
|
||||||
|
|
||||||
void menuHandler::keyVerificationInitMenu()
|
void menuHandler::keyVerificationInitMenu()
|
||||||
{
|
{
|
||||||
screen->showNodePicker("Node to Verify", 30000,
|
screen->showNodePicker("Node to Verify", 30000,
|
||||||
@ -941,6 +1060,9 @@ void menuHandler::handleMenuSwitch(OLEDDisplay *display)
|
|||||||
case clock_menu:
|
case clock_menu:
|
||||||
clockMenu();
|
clockMenu();
|
||||||
break;
|
break;
|
||||||
|
case system_base_menu:
|
||||||
|
systemBaseMenu();
|
||||||
|
break;
|
||||||
case position_base_menu:
|
case position_base_menu:
|
||||||
positionBaseMenu();
|
positionBaseMenu();
|
||||||
break;
|
break;
|
||||||
@ -970,6 +1092,9 @@ void menuHandler::handleMenuSwitch(OLEDDisplay *display)
|
|||||||
case reboot_menu:
|
case reboot_menu:
|
||||||
rebootMenu();
|
rebootMenu();
|
||||||
break;
|
break;
|
||||||
|
case shutdown_menu:
|
||||||
|
shutdownMenu();
|
||||||
|
break;
|
||||||
case add_favorite:
|
case add_favorite:
|
||||||
addFavoriteMenu();
|
addFavoriteMenu();
|
||||||
break;
|
break;
|
||||||
@ -994,6 +1119,15 @@ void menuHandler::handleMenuSwitch(OLEDDisplay *display)
|
|||||||
case bluetooth_toggle_menu:
|
case bluetooth_toggle_menu:
|
||||||
BluetoothToggleMenu();
|
BluetoothToggleMenu();
|
||||||
break;
|
break;
|
||||||
|
case notifications_menu:
|
||||||
|
notificationsMenu();
|
||||||
|
break;
|
||||||
|
case screen_options_menu:
|
||||||
|
screenOptionsMenu();
|
||||||
|
break;
|
||||||
|
case power_menu:
|
||||||
|
powerMenu();
|
||||||
|
break;
|
||||||
case throttle_message:
|
case throttle_message:
|
||||||
screen->showSimpleBanner("Too Many Attempts\nTry again in 60 seconds.", 5000);
|
screen->showSimpleBanner("Too Many Attempts\nTry again in 60 seconds.", 5000);
|
||||||
break;
|
break;
|
||||||
@ -1001,6 +1135,11 @@ void menuHandler::handleMenuSwitch(OLEDDisplay *display)
|
|||||||
menuQueue = menu_none;
|
menuQueue = menu_none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void menuHandler::saveUIConfig()
|
||||||
|
{
|
||||||
|
nodeDB->saveProto("/prefs/uiconfig.proto", meshtastic_DeviceUIConfig_size, &meshtastic_DeviceUIConfig_msg, &uiconfig);
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace graphics
|
} // namespace graphics
|
||||||
|
|
||||||
#endif
|
#endif
|
@ -23,14 +23,19 @@ class menuHandler
|
|||||||
tftcolormenupicker,
|
tftcolormenupicker,
|
||||||
brightness_picker,
|
brightness_picker,
|
||||||
reboot_menu,
|
reboot_menu,
|
||||||
|
shutdown_menu,
|
||||||
add_favorite,
|
add_favorite,
|
||||||
remove_favorite,
|
remove_favorite,
|
||||||
test_menu,
|
test_menu,
|
||||||
number_test,
|
number_test,
|
||||||
wifi_toggle_menu,
|
wifi_toggle_menu,
|
||||||
|
bluetooth_toggle_menu,
|
||||||
|
notifications_menu,
|
||||||
|
screen_options_menu,
|
||||||
|
power_menu,
|
||||||
|
system_base_menu,
|
||||||
key_verification_init,
|
key_verification_init,
|
||||||
key_verification_final_prompt,
|
key_verification_final_prompt,
|
||||||
bluetooth_toggle_menu,
|
|
||||||
throttle_message
|
throttle_message
|
||||||
};
|
};
|
||||||
static screenMenus menuQueue;
|
static screenMenus menuQueue;
|
||||||
@ -55,12 +60,19 @@ class menuHandler
|
|||||||
static void resetNodeDBMenu();
|
static void resetNodeDBMenu();
|
||||||
static void BrightnessPickerMenu();
|
static void BrightnessPickerMenu();
|
||||||
static void rebootMenu();
|
static void rebootMenu();
|
||||||
|
static void shutdownMenu();
|
||||||
static void addFavoriteMenu();
|
static void addFavoriteMenu();
|
||||||
static void removeFavoriteMenu();
|
static void removeFavoriteMenu();
|
||||||
static void testMenu();
|
static void testMenu();
|
||||||
static void numberTest();
|
static void numberTest();
|
||||||
static void wifiBaseMenu();
|
static void wifiBaseMenu();
|
||||||
static void wifiToggleMenu();
|
static void wifiToggleMenu();
|
||||||
|
static void notificationsMenu();
|
||||||
|
static void screenOptionsMenu();
|
||||||
|
static void powerMenu();
|
||||||
|
|
||||||
|
private:
|
||||||
|
static void saveUIConfig();
|
||||||
static void keyVerificationInitMenu();
|
static void keyVerificationInitMenu();
|
||||||
static void keyVerificationFinalPrompt();
|
static void keyVerificationFinalPrompt();
|
||||||
static void BluetoothToggleMenu();
|
static void BluetoothToggleMenu();
|
||||||
|
@ -39,8 +39,8 @@ void InkHUD::Events::begin()
|
|||||||
void InkHUD::Events::onButtonShort()
|
void InkHUD::Events::onButtonShort()
|
||||||
{
|
{
|
||||||
// Audio feedback (via buzzer)
|
// Audio feedback (via buzzer)
|
||||||
// Short low tone
|
// Short tone
|
||||||
playBoop();
|
playChirp();
|
||||||
// Cancel any beeping, buzzing, blinking
|
// Cancel any beeping, buzzing, blinking
|
||||||
// Some button handling suppressed if we are dismissing an external notification (see below)
|
// Some button handling suppressed if we are dismissing an external notification (see below)
|
||||||
bool dismissedExt = dismissExternalNotification();
|
bool dismissedExt = dismissExternalNotification();
|
||||||
@ -64,8 +64,8 @@ void InkHUD::Events::onButtonShort()
|
|||||||
void InkHUD::Events::onButtonLong()
|
void InkHUD::Events::onButtonLong()
|
||||||
{
|
{
|
||||||
// Audio feedback (via buzzer)
|
// Audio feedback (via buzzer)
|
||||||
// Low tone, longer than playBoop
|
// Slightly longer than playChirp
|
||||||
playBeep();
|
playBoop();
|
||||||
|
|
||||||
// Check which system applet wants to handle the button press (if any)
|
// Check which system applet wants to handle the button press (if any)
|
||||||
SystemApplet *consumer = nullptr;
|
SystemApplet *consumer = nullptr;
|
||||||
|
@ -362,9 +362,8 @@ ExternalNotificationModule::ExternalNotificationModule()
|
|||||||
if (nodeDB->loadProto(rtttlConfigFile, meshtastic_RTTTLConfig_size, sizeof(meshtastic_RTTTLConfig),
|
if (nodeDB->loadProto(rtttlConfigFile, meshtastic_RTTTLConfig_size, sizeof(meshtastic_RTTTLConfig),
|
||||||
&meshtastic_RTTTLConfig_msg, &rtttlConfig) != LoadFileResult::LOAD_SUCCESS) {
|
&meshtastic_RTTTLConfig_msg, &rtttlConfig) != LoadFileResult::LOAD_SUCCESS) {
|
||||||
memset(rtttlConfig.ringtone, 0, sizeof(rtttlConfig.ringtone));
|
memset(rtttlConfig.ringtone, 0, sizeof(rtttlConfig.ringtone));
|
||||||
strncpy(rtttlConfig.ringtone,
|
// The default ringtone is always loaded from userPrefs.jsonc
|
||||||
"24:d=32,o=5,b=565:f6,p,f6,4p,p,f6,p,f6,2p,p,b6,p,b6,p,b6,p,b6,p,b,p,b,p,b,p,b,p,b,p,b,p,b,p,b,1p.,2p.,p",
|
strncpy(rtttlConfig.ringtone, USERPREFS_RINGTONE, sizeof(rtttlConfig.ringtone));
|
||||||
sizeof(rtttlConfig.ringtone));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG_INFO("Init External Notification Module");
|
LOG_INFO("Init External Notification Module");
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
#include "RTC.h"
|
#include "RTC.h"
|
||||||
#include "graphics/draw/MenuHandler.h"
|
#include "graphics/draw/MenuHandler.h"
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
|
#include "meshUtils.h"
|
||||||
#include "modules/AdminModule.h"
|
#include "modules/AdminModule.h"
|
||||||
#include <SHA256.h>
|
#include <SHA256.h>
|
||||||
|
|
||||||
@ -85,9 +86,11 @@ bool KeyVerificationModule::handleReceivedProtobuf(const meshtastic_MeshPacket &
|
|||||||
sprintf(message, "Verification: \n");
|
sprintf(message, "Verification: \n");
|
||||||
generateVerificationCode(message + 15);
|
generateVerificationCode(message + 15);
|
||||||
LOG_INFO("Hash1 matches!");
|
LOG_INFO("Hash1 matches!");
|
||||||
IF_SCREEN(static const char *optionsArray[] = {"Reject", "Accept"}; graphics::BannerOverlayOptions options;
|
static const char *optionsArray[] = {"Reject", "Accept"};
|
||||||
options.message = message; options.durationMs = 30000; options.optionsArrayPtr = optionsArray;
|
// Don't try to put the array definition in the macro. Does not work with curly braces.
|
||||||
options.optionsCount = 2; options.notificationType = graphics::notificationTypeEnum::selection_picker;
|
IF_SCREEN(graphics::BannerOverlayOptions options; options.message = message; options.durationMs = 30000;
|
||||||
|
options.optionsArrayPtr = optionsArray; options.optionsCount = 2;
|
||||||
|
options.notificationType = graphics::notificationTypeEnum::selection_picker;
|
||||||
options.bannerCallback =
|
options.bannerCallback =
|
||||||
[=](int selected) {
|
[=](int selected) {
|
||||||
if (selected == 1) {
|
if (selected == 1) {
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
#include "PowerFSM.h"
|
#include "PowerFSM.h"
|
||||||
#include "buzz.h"
|
#include "buzz.h"
|
||||||
#include "configuration.h"
|
#include "configuration.h"
|
||||||
|
#include "graphics/Screen.h"
|
||||||
TextMessageModule *textMessageModule;
|
TextMessageModule *textMessageModule;
|
||||||
|
|
||||||
ProcessMessage TextMessageModule::handleReceived(const meshtastic_MeshPacket &mp)
|
ProcessMessage TextMessageModule::handleReceived(const meshtastic_MeshPacket &mp)
|
||||||
@ -17,7 +18,10 @@ ProcessMessage TextMessageModule::handleReceived(const meshtastic_MeshPacket &mp
|
|||||||
devicestate.rx_text_message = mp;
|
devicestate.rx_text_message = mp;
|
||||||
devicestate.has_rx_text_message = true;
|
devicestate.has_rx_text_message = true;
|
||||||
|
|
||||||
|
// Only trigger screen wake if configuration allows it
|
||||||
|
if (shouldWakeOnReceivedMessage()) {
|
||||||
powerFSM.trigger(EVENT_RECEIVED_MSG);
|
powerFSM.trigger(EVENT_RECEIVED_MSG);
|
||||||
|
}
|
||||||
notifyObservers(&mp);
|
notifyObservers(&mp);
|
||||||
|
|
||||||
return ProcessMessage::CONTINUE; // Let others look at this message also if they want
|
return ProcessMessage::CONTINUE; // Let others look at this message also if they want
|
||||||
|
@ -53,5 +53,6 @@
|
|||||||
// "USERPREFS_MQTT_ENCRYPTION_ENABLED": "true",
|
// "USERPREFS_MQTT_ENCRYPTION_ENABLED": "true",
|
||||||
// "USERPREFS_MQTT_TLS_ENABLED": "false",
|
// "USERPREFS_MQTT_TLS_ENABLED": "false",
|
||||||
// "USERPREFS_MQTT_ROOT_TOPIC": "event/REPLACEME",
|
// "USERPREFS_MQTT_ROOT_TOPIC": "event/REPLACEME",
|
||||||
|
"USERPREFS_RINGTONE": "24:d=32,o=5,b=565:f6,p,f6,4p,p,f6,p,f6,2p,p,b6,p,b6,p,b6,p,b6,p,b,p,b,p,b,p,b,p,b,p,b,p,b,p,b,1p.,2p.,p",
|
||||||
"USERPREFS_TZ_STRING": "tzplaceholder "
|
"USERPREFS_TZ_STRING": "tzplaceholder "
|
||||||
}
|
}
|
||||||
|
@ -104,11 +104,11 @@ void setupNicheGraphics()
|
|||||||
buttons->setHandlerDown(1, [backlight]() { backlight->peek(); });
|
buttons->setHandlerDown(1, [backlight]() { backlight->peek(); });
|
||||||
buttons->setHandlerLongPress(1, [backlight]() {
|
buttons->setHandlerLongPress(1, [backlight]() {
|
||||||
backlight->latch();
|
backlight->latch();
|
||||||
playBeep();
|
playBoop();
|
||||||
});
|
});
|
||||||
buttons->setHandlerShortPress(1, [backlight]() {
|
buttons->setHandlerShortPress(1, [backlight]() {
|
||||||
backlight->off();
|
backlight->off();
|
||||||
playBoop();
|
playChirp();
|
||||||
});
|
});
|
||||||
|
|
||||||
// Begin handling button events
|
// Begin handling button events
|
||||||
|
@ -107,7 +107,7 @@ void setupNicheGraphics()
|
|||||||
buttons->setWiring(1, PIN_BUTTON2);
|
buttons->setWiring(1, PIN_BUTTON2);
|
||||||
buttons->setHandlerShortPress(1, [inkhud]() {
|
buttons->setHandlerShortPress(1, [inkhud]() {
|
||||||
inkhud->nextTile();
|
inkhud->nextTile();
|
||||||
playBoop();
|
playChirp();
|
||||||
});
|
});
|
||||||
|
|
||||||
// Begin handling button events
|
// Begin handling button events
|
||||||
|
@ -104,7 +104,7 @@ void setupNicheGraphics()
|
|||||||
buttons->setWiring(1, PIN_BUTTON2);
|
buttons->setWiring(1, PIN_BUTTON2);
|
||||||
buttons->setHandlerShortPress(1, [inkhud]() {
|
buttons->setHandlerShortPress(1, [inkhud]() {
|
||||||
inkhud->nextTile();
|
inkhud->nextTile();
|
||||||
playBoop();
|
playChirp();
|
||||||
});
|
});
|
||||||
|
|
||||||
// Begin handling button events
|
// Begin handling button events
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
; Seeed Xiao BLE: https://www.digikey.com/en/products/detail/seeed-technology-co-ltd/102010448/16652893
|
; Seeed Xiao BLE: https://wiki.seeedstudio.com/XIAO_BLE/
|
||||||
[env:seeed_xiao_nrf52840_kit]
|
[env:seeed_xiao_nrf52840_kit]
|
||||||
extends = nrf52840_base
|
extends = nrf52840_base
|
||||||
board = xiao_ble_sense
|
board = xiao_ble_sense
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
[VERSION]
|
[VERSION]
|
||||||
major = 2
|
major = 2
|
||||||
minor = 7
|
minor = 7
|
||||||
build = 2
|
build = 3
|
||||||
|
Loading…
Reference in New Issue
Block a user