diff --git a/src/main.cpp b/src/main.cpp index 415d23f44..52359a6a6 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -374,9 +374,10 @@ void setup() #endif concurrency::hasBeenSetup = true; - +#if HAS_SCREEN meshtastic_Config_DisplayConfig_OledType screen_model = meshtastic_Config_DisplayConfig_OledType::meshtastic_Config_DisplayConfig_OledType_OLED_AUTO; +#endif OLEDDISPLAY_GEOMETRY screen_geometry = GEOMETRY_128_64; #ifdef USE_SEGGER @@ -601,6 +602,7 @@ void setup() } #endif +#if HAS_SCREEN auto screenInfo = i2cScanner->firstScreen(); screen_found = screenInfo.type != ScanI2C::DeviceType::NONE ? screenInfo.address : ScanI2C::ADDRESS_NONE; @@ -618,6 +620,7 @@ void setup() screen_model = meshtastic_Config_DisplayConfig_OledType::meshtastic_Config_DisplayConfig_OledType_OLED_AUTO; } } +#endif #define UPDATE_FROM_SCANNER(FIND_FN) #if defined(USE_VIRTUAL_KEYBOARD) @@ -763,6 +766,7 @@ void setup() else playStartMelody(); +#if HAS_SCREEN // fixed screen override? if (config.display.oled != meshtastic_Config_DisplayConfig_OledType_OLED_AUTO) screen_model = config.display.oled; @@ -775,6 +779,7 @@ void setup() #if defined(USE_SH1107_128_64) screen_model = meshtastic_Config_DisplayConfig_OledType_OLED_SH1107; // keep dimension of 128x64 #endif +#endif #if !MESHTASTIC_EXCLUDE_I2C #if !defined(ARCH_STM32WL) diff --git a/src/mesh/RadioInterface.cpp b/src/mesh/RadioInterface.cpp index bbd766329..9e1ea3f21 100644 --- a/src/mesh/RadioInterface.cpp +++ b/src/mesh/RadioInterface.cpp @@ -943,9 +943,9 @@ void RadioInterface::limitPower(int8_t loraMaxPower) } } else if (!devicestate.owner.is_licensed) { // we have an array of PA gain values. Find the highest power setting that works. - for (int radio_dbm = 0; radio_dbm < num_pa_points; radio_dbm++) { + for (int radio_dbm = 0; radio_dbm < (int)num_pa_points; radio_dbm++) { if (((radio_dbm + tx_gain[radio_dbm]) > power) || - ((radio_dbm == (num_pa_points - 1)) && ((radio_dbm + tx_gain[radio_dbm]) <= power))) { + ((radio_dbm == (int)(num_pa_points - 1)) && ((radio_dbm + tx_gain[radio_dbm]) <= power))) { // we've exceeded the power limit, or hit the max we can do LOG_INFO("Requested Tx power: %d dBm; Device LoRa Tx gain: %d dB", power, tx_gain[radio_dbm]); power -= tx_gain[radio_dbm]; diff --git a/src/modules/Telemetry/AirQualityTelemetry.cpp b/src/modules/Telemetry/AirQualityTelemetry.cpp index aac398eb9..cc1b54373 100644 --- a/src/modules/Telemetry/AirQualityTelemetry.cpp +++ b/src/modules/Telemetry/AirQualityTelemetry.cpp @@ -137,9 +137,9 @@ int32_t AirQualityTelemetryModule::runOnce() LOG_DEBUG("Sending sensors to sleep"); for (TelemetrySensor *sensor : sensors) { if (sensor->isActive() && sensor->canSleep()) { - if (sensor->wakeUpTimeMs() < Default::getConfiguredOrDefaultMsScaled(moduleConfig.telemetry.air_quality_interval, - default_telemetry_broadcast_interval_secs, - numOnlineNodes)) { + if (sensor->wakeUpTimeMs() < + (int32_t)Default::getConfiguredOrDefaultMsScaled(moduleConfig.telemetry.air_quality_interval, + default_telemetry_broadcast_interval_secs, numOnlineNodes)) { LOG_DEBUG("Disabling %s until next period", sensor->sensorName); sensor->sleep(); } else { diff --git a/src/modules/Telemetry/Sensor/SEN5XSensor.cpp b/src/modules/Telemetry/Sensor/SEN5XSensor.cpp index fc20ce1f2..2d890ca99 100644 --- a/src/modules/Telemetry/Sensor/SEN5XSensor.cpp +++ b/src/modules/Telemetry/Sensor/SEN5XSensor.cpp @@ -572,7 +572,7 @@ bool SEN5XSensor::initDevice(TwoWire *bus, ScanI2C::FoundDevice *dev) // Check if it is time to do a cleaning uint32_t now; - int32_t passed; + int32_t passed = 0; now = getValidTime(RTCQuality::RTCQualityDevice); // If time is not RTCQualityNone, it will return non-zero