Measures average max period use the same constant

Cellular network options using wifi measurement interval as the constant reference to calculate max period
This commit is contained in:
samuelbles07
2025-04-04 10:54:03 +07:00
parent 263dc9934e
commit 20a32dd22c

View File

@ -1463,12 +1463,8 @@ void setMeasurementMaxPeriod() {
int calculateMaxPeriod(int updateInterval) { int calculateMaxPeriod(int updateInterval) {
// 0.8 is 80% reduced interval for max period // 0.8 is 80% reduced interval for max period
if (networkOption == UseWifi) { // NOTE: Both network option use the same measurement interval
return (WIFI_MEASUREMENT_INTERVAL - (WIFI_MEASUREMENT_INTERVAL * 0.8)) / updateInterval; return (WIFI_MEASUREMENT_INTERVAL - (WIFI_MEASUREMENT_INTERVAL * 0.8)) / updateInterval;
} else {
// Cellular
return (CELLULAR_MEASUREMENT_INTERVAL - (CELLULAR_MEASUREMENT_INTERVAL * 0.8)) / updateInterval;
}
} }