lyre liu / Mbed 2 deprecated project1

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
lyreliu
Date:
Tue Mar 08 08:05:20 2016 +0000
Parent:
7:1f0ab6c43458
Child:
9:f4bfd06b3ef1
Commit message:
program

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Tue Mar 08 08:00:01 2016 +0000
+++ b/main.cpp	Tue Mar 08 08:05:20 2016 +0000
@@ -59,8 +59,8 @@
     end   = 0xff;
     if(mass>3)
         mass =3;
-    mass_trans_low = (unsigned int)(mass*10000);
-    mass_trans_high = (unsigned int)(mass*10000)>>8;
+    mass_trans_low = (unsigned char)(mass*10000);
+    mass_trans_high = (unsigned char)(mass*10000)>>8;
     pc.printf("%u",start);
     pc.printf("%u",mass_trans_high);
     pc.printf("%u",mass_trans_low);