jgh
Fork of BLE_API by
Diff: ble/services/EddystoneConfigService.h
- Revision:
- 890:f3144091ae19
- Parent:
- 885:1164aa1735ca
- Child:
- 906:8ddab3271c2f
diff -r 958c04685226 -r f3144091ae19 ble/services/EddystoneConfigService.h --- a/ble/services/EddystoneConfigService.h Thu Nov 26 12:52:00 2015 +0000 +++ b/ble/services/EddystoneConfigService.h Thu Nov 26 12:52:00 2015 +0000 @@ -215,7 +215,7 @@ DBG("Setting Default TLM Data, version = %d, advPeriodInMind= %f", tlmVersionIn, advPeriodInSec); defaultTlmVersion = tlmVersionIn; TlmBatteryVoltage = 0; - TlmBeaconTemp = 0x8000; + TlmBeaconTemp = 0; TlmPduCount = 0; TlmTimeSinceBoot = 0; defaultTlmAdvPeriod = advPeriodInSec; @@ -285,7 +285,7 @@ ble.setTxPower(radioPowerLevels[params.txPowerMode]); ble.setDeviceName(reinterpret_cast<const uint8_t *>(&DEVICE_NAME)); ble.setAdvertisingType(GapAdvertisingParams::ADV_CONNECTABLE_UNDIRECTED); - ble.setAdvertisingInterval(ADVERTISING_INTERVAL_MSEC); + ble.setAdvertisingInterval(GapAdvertisingParams::MSEC_TO_ADVERTISEMENT_DURATION_UNITS(ADVERTISING_INTERVAL_MSEC)); } /* @@ -306,7 +306,7 @@ eddyServ.setTLMFrameData(params.tlmVersion, params.tlmBeaconPeriod); } if (params.uriEnabled) { - eddyServ.setURLFrameEncodedData(params.advPowerLevels[params.txPowerMode], (const char *) params.uriData, params.uriDataLength, params.uriBeaconPeriod); + eddyServ.setURLFrameData(params.advPowerLevels[params.txPowerMode], (const char *) params.uriData, params.uriBeaconPeriod); } if (params.uidEnabled) { eddyServ.setUIDFrameData(params.advPowerLevels[params.txPowerMode], @@ -340,7 +340,7 @@ } else if (handle == uriDataChar.getValueHandle()) { params.uriDataLength = writeParams->len; memset(params.uriData, 0x00, URI_DATA_MAX); // clear URI string - memcpy(params.uriData, writeParams->data, writeParams->len); // set URI string + memcpy(params.uriData, writeParams->data, params.uriDataLength); // set URI string params.uriEnabled = true; INFO("URI = %s, URILen = %d", writeParams->data, writeParams->len); } else if (handle == flagsChar.getValueHandle()) { @@ -389,7 +389,7 @@ params.flags = 0x10; memcpy(params.advPowerLevels, defaultAdvPowerLevels, sizeof(PowerLevels_t)); params.txPowerMode = TX_POWER_MODE_LOW; - params.beaconPeriod = (uint16_t) defaultUriAdvPeriod * 1000; + params.beaconPeriod = 1000; // TLM Frame params.tlmVersion = defaultTlmVersion;