Skip to content

Commit

Permalink
30 secs grace time for new value
Browse files Browse the repository at this point in the history
  • Loading branch information
4RK4N committed Feb 4, 2024
1 parent 9f10e5d commit 1fc7439
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public static SGV generateSGV(Notification notification ,int record){
SGV oldSgv = lastReadings.get(lastReadings.size() - 1);
long lastreadingtime = oldSgv.timestamp; // SP.getLong("lastreadingtime_nl",timestamp);
int lastreadingvalue = oldSgv.raw; //SP.getInt("lastreadingvalue_nl",value);
if (value == lastreadingvalue && (lastreadingtime + (five_min * 1.0835)) > timestamp ) { // no new value // 5 min 25 secs grace time
if (value == lastreadingvalue && (lastreadingtime + (five_min * 1.1)) > timestamp ) { // no new value // 5 min 30 secs grace time
return null;
}
}
Expand Down

0 comments on commit 1fc7439

Please sign in to comment.