mirror of
https://github.com/alexhopeoconnor/firmware.git
synced 2026-10-18 01:11:42 +10:00
I thought git would be smart enough to understand all the whitespace changes but even with all the flags I know to make it ignore theses it still blows up if there are identical changes on both sides.
I have a solution but it require creating a new commit at the merge base for each conflicting PR and merging it into develop.
I don't think blowing up all PRs is worth for now, maybe if we can coordinate this for V3 let's say.
This reverts commit 0d11331d18.
This commit is contained in:
+23
-21
@@ -5,31 +5,33 @@
|
||||
|
||||
LIS3DHSensor::LIS3DHSensor(ScanI2C::FoundDevice foundDevice) : MotionSensor::MotionSensor(foundDevice) {}
|
||||
|
||||
bool LIS3DHSensor::init() {
|
||||
if (sensor.begin(deviceAddress())) {
|
||||
sensor.setRange(LIS3DH_RANGE_2_G);
|
||||
// Adjust threshold, higher numbers are less sensitive
|
||||
sensor.setClick(config.device.double_tap_as_button_press ? 2 : 1, MOTION_SENSOR_CHECK_INTERVAL_MS);
|
||||
LOG_DEBUG("LIS3DH init ok");
|
||||
return true;
|
||||
}
|
||||
LOG_DEBUG("LIS3DH init failed");
|
||||
return false;
|
||||
bool LIS3DHSensor::init()
|
||||
{
|
||||
if (sensor.begin(deviceAddress())) {
|
||||
sensor.setRange(LIS3DH_RANGE_2_G);
|
||||
// Adjust threshold, higher numbers are less sensitive
|
||||
sensor.setClick(config.device.double_tap_as_button_press ? 2 : 1, MOTION_SENSOR_CHECK_INTERVAL_MS);
|
||||
LOG_DEBUG("LIS3DH init ok");
|
||||
return true;
|
||||
}
|
||||
LOG_DEBUG("LIS3DH init failed");
|
||||
return false;
|
||||
}
|
||||
|
||||
int32_t LIS3DHSensor::runOnce() {
|
||||
if (sensor.getClick() > 0) {
|
||||
uint8_t click = sensor.getClick();
|
||||
if (!config.device.double_tap_as_button_press && config.display.wake_on_tap_or_motion) {
|
||||
wakeScreen();
|
||||
}
|
||||
int32_t LIS3DHSensor::runOnce()
|
||||
{
|
||||
if (sensor.getClick() > 0) {
|
||||
uint8_t click = sensor.getClick();
|
||||
if (!config.device.double_tap_as_button_press && config.display.wake_on_tap_or_motion) {
|
||||
wakeScreen();
|
||||
}
|
||||
|
||||
if (config.device.double_tap_as_button_press && (click & 0x20)) {
|
||||
buttonPress();
|
||||
return 500;
|
||||
if (config.device.double_tap_as_button_press && (click & 0x20)) {
|
||||
buttonPress();
|
||||
return 500;
|
||||
}
|
||||
}
|
||||
}
|
||||
return MOTION_SENSOR_CHECK_INTERVAL_MS;
|
||||
return MOTION_SENSOR_CHECK_INTERVAL_MS;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user