Check for HAS_SCREEN for showing calibration screen

This commit is contained in:
Jonathan Bennett 2025-05-05 21:49:30 -05:00
parent 98069c0ff9
commit b3d025a0b9
4 changed files with 5 additions and 5 deletions

View File

@ -255,7 +255,7 @@ int32_t ButtonThread::runOnce()
digitalWrite(PIN_EINK_EN, digitalRead(PIN_EINK_EN) == LOW); digitalWrite(PIN_EINK_EN, digitalRead(PIN_EINK_EN) == LOW);
break; break;
#endif #endif
#if !MESHTASTIC_EXCLUDE_SCREEN #if !MESHTASTIC_EXCLUDE_SCREEN && HAS_SCREEN
// 5 clicks: start accelerometer/magenetometer calibration for 30 seconds // 5 clicks: start accelerometer/magenetometer calibration for 30 seconds
case 5: case 5:
if (accelerometerThread) { if (accelerometerThread) {

View File

@ -46,7 +46,7 @@ int32_t ICM20948Sensor::runOnce()
int32_t ICM20948Sensor::runOnce() int32_t ICM20948Sensor::runOnce()
{ {
#if !defined(MESHTASTIC_EXCLUDE_SCREEN) #if !defined(MESHTASTIC_EXCLUDE_SCREEN) && HAS_SCREEN
float magX = 0, magY = 0, magZ = 0; float magX = 0, magY = 0, magZ = 0;
if (sensor->dataReady()) { if (sensor->dataReady()) {
sensor->getAGMT(); sensor->getAGMT();
@ -153,7 +153,7 @@ int32_t ICM20948Sensor::runOnce()
void ICM20948Sensor::calibrate(uint16_t forSeconds) void ICM20948Sensor::calibrate(uint16_t forSeconds)
{ {
#if !defined(MESHTASTIC_EXCLUDE_SCREEN) #if !defined(MESHTASTIC_EXCLUDE_SCREEN) && HAS_SCREEN
LOG_DEBUG("BMX160 calibration started for %is", forSeconds); LOG_DEBUG("BMX160 calibration started for %is", forSeconds);
doCalibration = true; doCalibration = true;

View File

@ -31,7 +31,7 @@ ScanI2C::I2CPort MotionSensor::devicePort()
return device.address.port; return device.address.port;
} }
#if !MESHTASTIC_EXCLUDE_SCREEN #if !defined(MESHTASTIC_EXCLUDE_SCREEN) && HAS_SCREEN
void MotionSensor::drawFrameCalibration(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y) void MotionSensor::drawFrameCalibration(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y)
{ {
// int x_offset = display->width() / 2; // int x_offset = display->width() / 2;

View File

@ -49,7 +49,7 @@ class MotionSensor
// Register a button press when a double-tap is detected // Register a button press when a double-tap is detected
virtual void buttonPress(); virtual void buttonPress();
#if !MESHTASTIC_EXCLUDE_SCREEN #if !defined(MESHTASTIC_EXCLUDE_SCREEN) && HAS_SCREEN
// draw an OLED frame (currently only used by the RAK4631 BMX160 sensor) // draw an OLED frame (currently only used by the RAK4631 BMX160 sensor)
static void drawFrameCalibration(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y); static void drawFrameCalibration(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y);
#endif #endif