diff options
Diffstat (limited to 'vote')
-rw-r--r-- | vote/vote.ino | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/vote/vote.ino b/vote/vote.ino index cc17e79..26c472a 100644 --- a/vote/vote.ino +++ b/vote/vote.ino @@ -29,8 +29,8 @@ #include <BLEEddystoneTLM.h> #include <BLEBeacon.h> -#define MUSSEL_VOTE_TIME_AHEAD 60000U // 1 minute -#define MUSSEL_VOTE_TIME_BEHIND 120000U // 2 minutes +#define VOTE_TIME_AHEAD 60000U // 1 minute +#define VOTE_TIME_BEHIND 120000U // 2 minutes // Limited size NOW!! can be transformed into infinite array #define STACK_SIZE 1000 @@ -115,11 +115,11 @@ bool qualifyVote(Vote vote, unsigned long currentTime) { // If the measure is 42 (YES), check timestamp validity if (vote.measure == 42) { // If the vote's timestamp is within 1 minute, count it as YES - if (currentTime - vote.timestamp <= MUSSEL_VOTE_TIME_AHEAD) { + if (currentTime - vote.timestamp <= VOTE_TIME_AHEAD) { return true; } // If the vote's timestamp is older than 2 minutes, count it as NO - else if (currentTime - vote.timestamp > MUSSEL_VOTE_TIME_BEHIND) { + else if (currentTime - vote.timestamp > VOTE_TIME_BEHIND) { return false; } } |