aboutsummaryrefslogtreecommitdiff
path: root/vote
diff options
context:
space:
mode:
Diffstat (limited to 'vote')
-rw-r--r--vote/vote.ino11
1 files changed, 6 insertions, 5 deletions
diff --git a/vote/vote.ino b/vote/vote.ino
index 6cfca11..8036408 100644
--- a/vote/vote.ino
+++ b/vote/vote.ino
@@ -28,6 +28,9 @@
#include <BLEAdvertisedDevice.h>
#include <BLEEddystoneTLM.h>
#include <BLEBeacon.h>
+#define SCAN_INTERVAL 100
+#define SCAN_WINDOW 99
+#define SCAN_TIME_SEC 1
// Validity timing thresholds
const unsigned long VOTE_TIME_AHEAD = 1 * 60 * 1000; // 1 minute
@@ -45,8 +48,6 @@ struct Vote {
// Index of the top element in the stack, -1 means stack is empty
int top = -1;
-int scanTime = 1; //In seconds
-
// pointer to control Bluetooth networking
BLEScan *pBLEScan;
@@ -130,13 +131,13 @@ void setup() {
pBLEScan->setAdvertisedDeviceCallbacks(
new MyAdvertisedDeviceCallbacks());
pBLEScan->setActiveScan(true);
- pBLEScan->setInterval(100);
- pBLEScan->setWindow(99);
+ pBLEScan->setInterval(SCAN_INTERVAL);
+ pBLEScan->setWindow(SCAN_WINDOW);
}
void loop() {
- BLEScanResults *foundDevices = pBLEScan->start(scanTime, false);
+ pBLEScan->start(SCAN_TIME_SEC, false);
pBLEScan->clearResults();
delay(500);