fix some random compiler warnings (#9596)
This commit is contained in:
committed by
Ben Meadors
co-authored by
Ben Meadors
parent
4954723f97
commit
5b03b1fe52
+6
-1
@@ -374,9 +374,10 @@ void setup()
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
concurrency::hasBeenSetup = true;
|
concurrency::hasBeenSetup = true;
|
||||||
|
#if HAS_SCREEN
|
||||||
meshtastic_Config_DisplayConfig_OledType screen_model =
|
meshtastic_Config_DisplayConfig_OledType screen_model =
|
||||||
meshtastic_Config_DisplayConfig_OledType::meshtastic_Config_DisplayConfig_OledType_OLED_AUTO;
|
meshtastic_Config_DisplayConfig_OledType::meshtastic_Config_DisplayConfig_OledType_OLED_AUTO;
|
||||||
|
#endif
|
||||||
OLEDDISPLAY_GEOMETRY screen_geometry = GEOMETRY_128_64;
|
OLEDDISPLAY_GEOMETRY screen_geometry = GEOMETRY_128_64;
|
||||||
|
|
||||||
#ifdef USE_SEGGER
|
#ifdef USE_SEGGER
|
||||||
@@ -601,6 +602,7 @@ void setup()
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if HAS_SCREEN
|
||||||
auto screenInfo = i2cScanner->firstScreen();
|
auto screenInfo = i2cScanner->firstScreen();
|
||||||
screen_found = screenInfo.type != ScanI2C::DeviceType::NONE ? screenInfo.address : ScanI2C::ADDRESS_NONE;
|
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;
|
screen_model = meshtastic_Config_DisplayConfig_OledType::meshtastic_Config_DisplayConfig_OledType_OLED_AUTO;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#define UPDATE_FROM_SCANNER(FIND_FN)
|
#define UPDATE_FROM_SCANNER(FIND_FN)
|
||||||
#if defined(USE_VIRTUAL_KEYBOARD)
|
#if defined(USE_VIRTUAL_KEYBOARD)
|
||||||
@@ -763,6 +766,7 @@ void setup()
|
|||||||
else
|
else
|
||||||
playStartMelody();
|
playStartMelody();
|
||||||
|
|
||||||
|
#if HAS_SCREEN
|
||||||
// fixed screen override?
|
// fixed screen override?
|
||||||
if (config.display.oled != meshtastic_Config_DisplayConfig_OledType_OLED_AUTO)
|
if (config.display.oled != meshtastic_Config_DisplayConfig_OledType_OLED_AUTO)
|
||||||
screen_model = config.display.oled;
|
screen_model = config.display.oled;
|
||||||
@@ -775,6 +779,7 @@ void setup()
|
|||||||
#if defined(USE_SH1107_128_64)
|
#if defined(USE_SH1107_128_64)
|
||||||
screen_model = meshtastic_Config_DisplayConfig_OledType_OLED_SH1107; // keep dimension of 128x64
|
screen_model = meshtastic_Config_DisplayConfig_OledType_OLED_SH1107; // keep dimension of 128x64
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#if !MESHTASTIC_EXCLUDE_I2C
|
#if !MESHTASTIC_EXCLUDE_I2C
|
||||||
#if !defined(ARCH_STM32WL)
|
#if !defined(ARCH_STM32WL)
|
||||||
|
|||||||
@@ -943,9 +943,9 @@ void RadioInterface::limitPower(int8_t loraMaxPower)
|
|||||||
}
|
}
|
||||||
} else if (!devicestate.owner.is_licensed) {
|
} else if (!devicestate.owner.is_licensed) {
|
||||||
// we have an array of PA gain values. Find the highest power setting that works.
|
// 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) ||
|
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
|
// 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]);
|
LOG_INFO("Requested Tx power: %d dBm; Device LoRa Tx gain: %d dB", power, tx_gain[radio_dbm]);
|
||||||
power -= tx_gain[radio_dbm];
|
power -= tx_gain[radio_dbm];
|
||||||
|
|||||||
@@ -137,9 +137,9 @@ int32_t AirQualityTelemetryModule::runOnce()
|
|||||||
LOG_DEBUG("Sending sensors to sleep");
|
LOG_DEBUG("Sending sensors to sleep");
|
||||||
for (TelemetrySensor *sensor : sensors) {
|
for (TelemetrySensor *sensor : sensors) {
|
||||||
if (sensor->isActive() && sensor->canSleep()) {
|
if (sensor->isActive() && sensor->canSleep()) {
|
||||||
if (sensor->wakeUpTimeMs() < Default::getConfiguredOrDefaultMsScaled(moduleConfig.telemetry.air_quality_interval,
|
if (sensor->wakeUpTimeMs() <
|
||||||
default_telemetry_broadcast_interval_secs,
|
(int32_t)Default::getConfiguredOrDefaultMsScaled(moduleConfig.telemetry.air_quality_interval,
|
||||||
numOnlineNodes)) {
|
default_telemetry_broadcast_interval_secs, numOnlineNodes)) {
|
||||||
LOG_DEBUG("Disabling %s until next period", sensor->sensorName);
|
LOG_DEBUG("Disabling %s until next period", sensor->sensorName);
|
||||||
sensor->sleep();
|
sensor->sleep();
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -572,7 +572,7 @@ bool SEN5XSensor::initDevice(TwoWire *bus, ScanI2C::FoundDevice *dev)
|
|||||||
|
|
||||||
// Check if it is time to do a cleaning
|
// Check if it is time to do a cleaning
|
||||||
uint32_t now;
|
uint32_t now;
|
||||||
int32_t passed;
|
int32_t passed = 0;
|
||||||
now = getValidTime(RTCQuality::RTCQualityDevice);
|
now = getValidTime(RTCQuality::RTCQualityDevice);
|
||||||
|
|
||||||
// If time is not RTCQualityNone, it will return non-zero
|
// If time is not RTCQualityNone, it will return non-zero
|
||||||
|
|||||||
Reference in New Issue
Block a user