aboutsummaryrefslogtreecommitdiff
path: root/vote
diff options
context:
space:
mode:
Diffstat (limited to 'vote')
-rw-r--r--vote/vote.ino6
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 {