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_6180XA1 mbed
Fork of HelloWorld_6180XA1 by
Revision 22:bb440c864489, committed 2015-11-02
- Comitter:
- gallonm
- Date:
- Mon Nov 02 15:18:12 2015 +0000
- Parent:
- 21:19fb31bb15e0
- Child:
- 23:9085260d2902
- Commit message:
- Updated main.cpp
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Mon Nov 02 13:54:25 2015 +0000
+++ b/main.cpp Mon Nov 02 15:18:12 2015 +0000
@@ -61,6 +61,11 @@
sprintf(str,"%d",data_sensor_top.range_mm);
board->display->DisplayString(str, strlen(str));
}
+ else
+ {
+ sprintf(str,"%s","----");
+ board->display->DisplayString(str, strlen(str));
+ }
}
else if(op_mode==als_continuous_interrupt)
{
@@ -69,6 +74,11 @@
sprintf(str,"%d",data_sensor_top.lux);
board->display->DisplayString(str, strlen(str));
}
+ else
+ {
+ sprintf(str,"%s","----");
+ board->display->DisplayString(str, strlen(str));
+ }
}
}
@@ -104,15 +114,7 @@
{
flag_sensor_top=false;
status=board->sensor_top->HandleIRQ(operating_mode, &data_sensor_top);
- if(!status)
- {
- DisplayRefresh(operating_mode);
- }
- /*else // FIXME va in CRASH se aggiungo queste righe!!!!!!!!!!!!!
- {
- sprintf(str,"%s","----");
- board->display->DisplayString(str, strlen(str));
- }*/
+ DisplayRefresh(operating_mode);
}
if(flag_stop_measure)
{
@@ -163,4 +165,3 @@
delete board;
}
-
