diff options
Diffstat (limited to 'sensor/sensor.ino')
-rw-r--r-- | sensor/sensor.ino | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/sensor/sensor.ino b/sensor/sensor.ino index a05d6cc..019ff23 100644 --- a/sensor/sensor.ino +++ b/sensor/sensor.ino @@ -141,9 +141,9 @@ int getGapeAngle() { } // Construct Bluetooth beacon -void setBeacon() { +void setBeacon(int angle) { BLEEddystoneTLM EddystoneTLM; - EddystoneTLM.setTemp(getGapeAngle()); + EddystoneTLM.setTemp(angle); log_i("Gape angle: %.2f°", EddystoneTLM.getTemp()); BLEAdvertisementData oAdvertisementData = BLEAdvertisementData(); @@ -174,13 +174,11 @@ void setup() { BLEDevice::init("TLMBeacon"); BLEDevice::setPower(BEACON_POWER); pAdvertising = BLEDevice::getAdvertising(); - setBeacon(); + setBeacon(getGapeAngle()); pAdvertising->start(); } void loop() { -// keepPace(); -// Serial.println(getGapeAngle()); - setBeacon(); + setBeacon(getGapeAngle()); delay(500); } |