From 20a32dd22ce8d13efca884684846a52858d70c47 Mon Sep 17 00:00:00 2001 From: samuelbles07 Date: Fri, 4 Apr 2025 10:54:03 +0700 Subject: [PATCH] Measures average max period use the same constant Cellular network options using wifi measurement interval as the constant reference to calculate max period --- examples/OneOpenAir/OneOpenAir.ino | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/examples/OneOpenAir/OneOpenAir.ino b/examples/OneOpenAir/OneOpenAir.ino index b12c3c6..df39d6c 100644 --- a/examples/OneOpenAir/OneOpenAir.ino +++ b/examples/OneOpenAir/OneOpenAir.ino @@ -1463,12 +1463,8 @@ void setMeasurementMaxPeriod() { int calculateMaxPeriod(int updateInterval) { // 0.8 is 80% reduced interval for max period - if (networkOption == UseWifi) { - return (WIFI_MEASUREMENT_INTERVAL - (WIFI_MEASUREMENT_INTERVAL * 0.8)) / updateInterval; - } else { - // Cellular - return (CELLULAR_MEASUREMENT_INTERVAL - (CELLULAR_MEASUREMENT_INTERVAL * 0.8)) / updateInterval; - } + // NOTE: Both network option use the same measurement interval + return (WIFI_MEASUREMENT_INTERVAL - (WIFI_MEASUREMENT_INTERVAL * 0.8)) / updateInterval; }