diff options
author | Jonas Smedegaard <dr@jones.dk> | 2025-04-16 23:09:26 +0200 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2025-04-16 23:09:26 +0200 |
commit | 90e40ea6967cdf27ab64a59db59c9a172a649c90 (patch) | |
tree | 8a88548510e8e27321f9d81e66f46c414a24fb8c /vote | |
parent | 0b595c44705a2587cc139ca922ee5c0804fc026c (diff) |
rename variable VOTE_TIME_INVALID -> VOTE_TIME_TOLERANCE
Diffstat (limited to 'vote')
-rw-r--r-- | vote/vote.ino | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/vote/vote.ino b/vote/vote.ino index ab47e38..4548087 100644 --- a/vote/vote.ino +++ b/vote/vote.ino @@ -37,7 +37,7 @@ #define BALLOT_MAX 5 // Validity timing thresholds -const unsigned long VOTE_TIME_INVALID = 1 * 60 * 1000; // 1 minute +const unsigned long VOTE_TIME_TOLERANCE = 1 * 60 * 1000; // 1 minute // Classify gape state enum MusselGapState { @@ -118,7 +118,7 @@ void cleanOldVotes() { for (int j = 0; j < voter.voteCount; j++) { unsigned long age = now - voter.votes[j].timestamp; - if (age < VOTE_TIME_INVALID) { + if (age < VOTE_TIME_TOLERANCE) { voter.votes[newCount++] = voter.votes[j]; } else { log_i("Dropped old vote for Mussel %s | Age: %lu ms", @@ -178,7 +178,7 @@ const char* qualifyMusselVote( // Log vote age and gape log_i("Qualifying vote | Time since vote: %lu ms", age); - if (age <= VOTE_TIME_INVALID) { + if (age <= VOTE_TIME_TOLERANCE) { log_i("→ VALID: Vote is within 1 minute"); return "valid"; } else { |