Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed BLE_API nRF51822
Revision 11:8500dadc8a7e, committed 2014-11-09
- Comitter:
- pgao
- Date:
- Sun Nov 09 23:01:02 2014 +0000
- Parent:
- 10:0193462ea6f1
- Commit message:
- fix char
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 0193462ea6f1 -r 8500dadc8a7e main.cpp
--- a/main.cpp Sun Nov 09 22:38:56 2014 +0000
+++ b/main.cpp Sun Nov 09 23:01:02 2014 +0000
@@ -52,10 +52,9 @@
powerSwitch = 0;
}
//ble.updateCharacteristicValue(uartServicePtr->getRXCharacteristicHandle(), params->data, bytesRead);
- char buffer[30];
- sprintf(buffer,"%4.0f",tempF);
- char *data [] = {buffer};
- ble.updateCharacteristicValue(uartServicePtr->getRXCharacteristicHandle(), (uint8_t *)data, sizeof(&data));
+ char buffer[9];
+ sprintf(buffer,"%4.4f",tempF);
+ ble.updateCharacteristicValue(uartServicePtr->getRXCharacteristicHandle(), (uint8_t *)buffer, sizeof(&buffer));
}
}