test
Dependencies: BLE_API nRF51822 mbed
Fork of KS7 by
Diff: main.cpp
- Revision:
- 18:d1d15ec580fa
- Parent:
- 17:994c1f037198
- Child:
- 19:05526fe9365e
diff -r 994c1f037198 -r d1d15ec580fa main.cpp --- a/main.cpp Fri Dec 18 11:44:55 2015 +0000 +++ b/main.cpp Thu Jan 14 02:12:19 2016 +0000 @@ -15,7 +15,7 @@ #define MANUFACTURER_NAME_STRING "Hacarus" // Manufacturer Name String - shall represent the name of the manufacturer of the device. #define MODEL_NUMBER_STRING "0001" // Model Number String - shall represent the model number that is assigned by the device vendor. #define SERIAL_NUMBER_STRING "000780c0ffeef00d" // Serial Number String - shall represent the serial number for a particular instance of the device. -#define FIRMWARE_REVISION_STRING "v1.00.007@rev0016" // Firmware Revision String - shall represent the firmware revision for the firmware within the device. +#define FIRMWARE_REVISION_STRING "v1.00.008@rev0018" // Firmware Revision String - shall represent the firmware revision for the firmware within the device. // Weight Scale Service (Original) #define UUID_WEIGHT_SCALE_SERVICE (0x181D) @@ -255,6 +255,11 @@ ble.stopAdvertising(); } }else{ + scale++; + ble.updateCharacteristicValue(WeightScale.getValueAttribute().getHandle(), + (uint8_t *)&scale, + sizeof(scale)); + weight = io.get_weight_raw() / WEIGHT_COEFFICIENT; // pc.printf("w=%f\r\n", weight); if(weight < 0){