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: ArduinoFB SRF05 mbed
Diff: main.cpp
- Revision:
- 1:0f0f31f25bbd
- Parent:
- 0:fac6c6a73e5f
diff -r fac6c6a73e5f -r 0f0f31f25bbd main.cpp
--- a/main.cpp Thu Feb 12 10:26:36 2015 +0000
+++ b/main.cpp Thu Feb 12 12:42:42 2015 +0000
@@ -55,13 +55,7 @@
float val;
val=srf*100;
- /*
- unsigned char t=((val%1000)/100);
-
- disbuff[0]= (unsigned char)(val/1000);
- disbuff[1]= (unsigned char)((val%1000)/100);
- disbuff[2]= (unsigned char)((val%100)/10);
- */
+
disbuff[0]= (unsigned char)(val/1000);
disbuff[1]= (val/100)-disbuff[0]*10;
disbuff[2]= (val/10)-(disbuff[0]*100+disbuff[1]*10);