mirror of
https://github.com/meshtastic/firmware.git
synced 2025-02-26 22:33:24 +00:00
* tryfix #4384 - don't assume we want that functionality if the Accelerometer was found. This is only for T-Watch * Add config.display.wake_on_tap_or_motion default to RAK --------- Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
This commit is contained in:
parent
35a565cd84
commit
8f35a42f4f
src
@ -635,8 +635,6 @@ void setup()
|
|||||||
#if !MESHTASTIC_EXCLUDE_I2C
|
#if !MESHTASTIC_EXCLUDE_I2C
|
||||||
#if !defined(ARCH_PORTDUINO) && !defined(ARCH_STM32WL) && !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR
|
#if !defined(ARCH_PORTDUINO) && !defined(ARCH_STM32WL) && !MESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR
|
||||||
if (acc_info.type != ScanI2C::DeviceType::NONE) {
|
if (acc_info.type != ScanI2C::DeviceType::NONE) {
|
||||||
config.display.wake_on_tap_or_motion = true;
|
|
||||||
moduleConfig.external_notification.enabled = true;
|
|
||||||
accelerometerThread = new AccelerometerThread(acc_info.type);
|
accelerometerThread = new AccelerometerThread(acc_info.type);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -362,6 +362,9 @@ void NodeDB::installDefaultConfig()
|
|||||||
#ifdef DISPLAY_FLIP_SCREEN
|
#ifdef DISPLAY_FLIP_SCREEN
|
||||||
config.display.flip_screen = true;
|
config.display.flip_screen = true;
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef RAK4630
|
||||||
|
config.display.wake_on_tap_or_motion = true;
|
||||||
|
#endif
|
||||||
#ifdef T_WATCH_S3
|
#ifdef T_WATCH_S3
|
||||||
config.display.screen_on_secs = 30;
|
config.display.screen_on_secs = 30;
|
||||||
config.display.wake_on_tap_or_motion = true;
|
config.display.wake_on_tap_or_motion = true;
|
||||||
@ -1190,4 +1193,4 @@ void recordCriticalError(meshtastic_CriticalErrorCode code, uint32_t address, co
|
|||||||
LOG_ERROR("A critical failure occurred, portduino is exiting...");
|
LOG_ERROR("A critical failure occurred, portduino is exiting...");
|
||||||
exit(2);
|
exit(2);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -406,7 +406,8 @@ void AdminModule::handleSetConfig(const meshtastic_Config &c)
|
|||||||
LOG_INFO("Setting config: Device\n");
|
LOG_INFO("Setting config: Device\n");
|
||||||
config.has_device = true;
|
config.has_device = true;
|
||||||
#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->start();
|
accelerometerThread->start();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -484,7 +485,8 @@ void AdminModule::handleSetConfig(const meshtastic_Config &c)
|
|||||||
requiresReboot = false;
|
requiresReboot = false;
|
||||||
}
|
}
|
||||||
#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->start();
|
accelerometerThread->start();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user