mirror of
https://github.com/meshtastic/firmware.git
synced 2025-04-24 09:26:52 +00:00
Get accelerometerThread running from AdminModule. (#4886)
This commit is contained in:
parent
d41d4c930e
commit
d73cbf14d5
@ -432,6 +432,8 @@ void AdminModule::handleSetConfig(const meshtastic_Config &c)
|
|||||||
#if !defined(ARCH_PORTDUINO) && !defined(ARCH_STM32WL) && !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR
|
#if !defined(ARCH_PORTDUINO) && !defined(ARCH_STM32WL) && !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR
|
||||||
if (config.device.double_tap_as_button_press == false && c.payload_variant.device.double_tap_as_button_press == true &&
|
if (config.device.double_tap_as_button_press == false && c.payload_variant.device.double_tap_as_button_press == true &&
|
||||||
accelerometerThread->enabled == false) {
|
accelerometerThread->enabled == false) {
|
||||||
|
config.device.double_tap_as_button_press = c.payload_variant.device.double_tap_as_button_press;
|
||||||
|
accelerometerThread->enabled = true;
|
||||||
accelerometerThread->start();
|
accelerometerThread->start();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -511,6 +513,8 @@ void AdminModule::handleSetConfig(const meshtastic_Config &c)
|
|||||||
#if !defined(ARCH_PORTDUINO) && !defined(ARCH_STM32WL) && !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR
|
#if !defined(ARCH_PORTDUINO) && !defined(ARCH_STM32WL) && !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR
|
||||||
if (config.display.wake_on_tap_or_motion == false && c.payload_variant.display.wake_on_tap_or_motion == true &&
|
if (config.display.wake_on_tap_or_motion == false && c.payload_variant.display.wake_on_tap_or_motion == true &&
|
||||||
accelerometerThread->enabled == false) {
|
accelerometerThread->enabled == false) {
|
||||||
|
config.display.wake_on_tap_or_motion = c.payload_variant.display.wake_on_tap_or_motion;
|
||||||
|
accelerometerThread->enabled = true;
|
||||||
accelerometerThread->start();
|
accelerometerThread->start();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user