conflict resolution

This commit is contained in:
Thomas Göttgens
2024-10-08 11:41:54 +02:00
11 changed files with 758 additions and 9 deletions

View File

@@ -5,9 +5,11 @@
BMX160Sensor::BMX160Sensor(ScanI2C::FoundDevice foundDevice) : MotionSensor::MotionSensor(foundDevice) {}
#ifdef RAK_4631
#if !defined(MESHTASTIC_EXCLUDE_SCREEN)
// screen is defined in main.cpp
extern graphics::Screen *screen;
#endif
bool BMX160Sensor::init()
{
@@ -29,6 +31,7 @@ int32_t BMX160Sensor::runOnce()
/* Get a new sensor event */
sensor.getAllData(&magAccel, NULL, &gAccel);
#if !defined(MESHTASTIC_EXCLUDE_SCREEN)
// experimental calibrate routine. Limited to between 10 and 30 seconds after boot
if (millis() > 12 * 1000 && millis() < 30 * 1000) {
if (!showingScreen) {
@@ -91,6 +94,7 @@ int32_t BMX160Sensor::runOnce()
break;
}
screen->setHeading(heading);
#endif
return MOTION_SENSOR_CHECK_INTERVAL_MS;
}