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.
Revision 3:78735753b3cc, committed 2022-10-06
- Comitter:
- ikarashikota
- Date:
- Thu Oct 06 23:33:23 2022 +0000
- Parent:
- 2:d8bfeadb944e
- Commit message:
- fixed
Changed in this revision
| DataControl.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/DataControl.cpp Sat Oct 01 16:19:44 2022 +0000
+++ b/DataControl.cpp Thu Oct 06 23:33:23 2022 +0000
@@ -34,7 +34,7 @@
void DataControl::dataSet(int data, char *data_array)
{
- separated_data_size = sizeof(data); // 4
+ separated_data_size = sizeof(data) + 1; // 4
dataSeparate(data & 0xFFFF, data_array);
dataSeparate((data & 0xFFFF0000) >> 16, &data_array[2]);
}
@@ -42,13 +42,13 @@
void DataControl::dataSet(uint16_t data, char *data_array)
{
- separated_data_size = sizeof(data); // 2
+ separated_data_size = sizeof(data) + 1; // 2
dataSeparate(data, data_array);
}
void DataControl::dataSet(char data, char *data_array)
{
- separated_data_size = sizeof(data); // 1
+ separated_data_size = sizeof(data) + 1; // 1
data_array[0] = data;
}