diff --git a/src/graphics/draw/UIRenderer.cpp b/src/graphics/draw/UIRenderer.cpp index f64d4a436..6f499483f 100644 --- a/src/graphics/draw/UIRenderer.cpp +++ b/src/graphics/draw/UIRenderer.cpp @@ -79,10 +79,12 @@ static inline void transformNeedlePoint(float localX, float localY, float sinHea outY = static_cast(y); } +#if GRAPHICS_TFT_COLORING_ENABLED static float getCompassRingAngleOffset(float heading) { return (uiconfig.compass_mode != meshtastic_CompassMode_FIXED_RING) ? -heading : 0.0f; } +#endif static inline StandardCompassNeedlePoints computeStandardCompassNeedlePoints(int16_t compassX, int16_t compassY, uint16_t compassDiam, float headingRadian, diff --git a/src/motion/ICM42607PSensor.cpp b/src/motion/ICM42607PSensor.cpp index 0bace05a8..5cd565fea 100644 --- a/src/motion/ICM42607PSensor.cpp +++ b/src/motion/ICM42607PSensor.cpp @@ -71,9 +71,6 @@ int32_t ICM42607PSensor::runOnce() } return MOTION_SENSOR_CHECK_INTERVAL_MS; #else - int16_t x = 0; - int16_t y = 0; - int16_t z = 0; inv_imu_sensor_event_t event = {}; if (sensor == nullptr || sensor->getDataFromRegisters(event) != 0) { @@ -85,11 +82,8 @@ int32_t ICM42607PSensor::runOnce() return MOTION_SENSOR_CHECK_INTERVAL_MS; } - x = event.accel[0]; - y = event.accel[1]; - z = event.accel[2]; - // LOG_DEBUG("ICM-42607-P accel read x=%.3fg y=%.3fg z=%.3fg", (float)x / ICM42607P_COUNTS_PER_G, - // (float)y / ICM42607P_COUNTS_PER_G, (float)z / ICM42607P_COUNTS_PER_G); + // LOG_DEBUG("ICM-42607-P accel read x=%.3fg y=%.3fg z=%.3fg", (float)event.accel[0] / ICM42607P_COUNTS_PER_G, + // (float)event.accel[1] / ICM42607P_COUNTS_PER_G, (float)event.accel[2] / ICM42607P_COUNTS_PER_G); return MOTION_SENSOR_CHECK_INTERVAL_MS; #endif