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: X_NUCLEO_IKS01A1-f255a2c75ecb mbed-rtos mbed
Diff: sensor.cpp
- Revision:
- 27:1216b002cbf3
- Parent:
- 25:2197b8bb930c
- Child:
- 28:256ca0a52c76
--- a/sensor.cpp Tue May 17 21:59:20 2016 +0000
+++ b/sensor.cpp Tue May 17 23:23:38 2016 +0000
@@ -14,12 +14,12 @@
void ExpansionBoard::sampleData()
{
if(flag) printf("\nAbout to alloc\n");
- log_data* log_d = (log_data*)mail_box.alloc();
+ log_data* log_d = (log_data*)mail_box.alloc(5000);
if (log_d == NULL) {
- mail_box.get();
+ mail_box.get(5000);
if(flag) printf("Out of memory, last sample deleted\n");
- log_data* log_d = (log_data*)mail_box.alloc();
+ log_data* log_d = (log_data*)mail_box.alloc(5000);
if(flag) printf("Allocated after out of memory\n");
}
