diff --git a/src/ButtonThread.cpp b/src/ButtonThread.cpp index c3fdf2b41..352885dbe 100644 --- a/src/ButtonThread.cpp +++ b/src/ButtonThread.cpp @@ -255,7 +255,7 @@ int32_t ButtonThread::runOnce() digitalWrite(PIN_EINK_EN, digitalRead(PIN_EINK_EN) == LOW); break; #endif -#if !MESHTASTIC_EXCLUDE_SCREEN +#if !MESHTASTIC_EXCLUDE_SCREEN && HAS_SCREEN // 5 clicks: start accelerometer/magenetometer calibration for 30 seconds case 5: if (accelerometerThread) { diff --git a/src/motion/ICM20948Sensor.cpp b/src/motion/ICM20948Sensor.cpp index dd0d5efba..d03633124 100755 --- a/src/motion/ICM20948Sensor.cpp +++ b/src/motion/ICM20948Sensor.cpp @@ -46,7 +46,7 @@ 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; if (sensor->dataReady()) { sensor->getAGMT(); @@ -153,7 +153,7 @@ int32_t ICM20948Sensor::runOnce() 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); doCalibration = true; diff --git a/src/motion/MotionSensor.cpp b/src/motion/MotionSensor.cpp index a6718c8d5..56738d355 100755 --- a/src/motion/MotionSensor.cpp +++ b/src/motion/MotionSensor.cpp @@ -31,7 +31,7 @@ ScanI2C::I2CPort MotionSensor::devicePort() 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) { // int x_offset = display->width() / 2; diff --git a/src/motion/MotionSensor.h b/src/motion/MotionSensor.h index df864fc9c..5039f2551 100755 --- a/src/motion/MotionSensor.h +++ b/src/motion/MotionSensor.h @@ -49,7 +49,7 @@ class MotionSensor // Register a button press when a double-tap is detected 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) static void drawFrameCalibration(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y); #endif