Added negative sign for display and updated data interval.
Dependencies: MMA8451Q SLCD_minus_mod mbed
Fork of ACC_LCD_341_MID by
Revision 5:29c6ba524263, committed 2016-11-14
- Comitter:
- scohennm
- Date:
- Mon Nov 14 15:50:33 2016 +0000
- Parent:
- 4:1d559bac561a
- Commit message:
- Changed SLCD
Changed in this revision
SLCD.lib | Show annotated file Show diff for this revision Revisions of this file |
acc_341.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 1d559bac561a -r 29c6ba524263 SLCD.lib --- a/SLCD.lib Sun Nov 06 23:56:18 2016 +0000 +++ b/SLCD.lib Mon Nov 14 15:50:33 2016 +0000 @@ -1,1 +1,1 @@ -https://developer.mbed.org/users/scohennm/code/SLCD_minus_mod/#ee727b8319f4 +https://developer.mbed.org/users/scohennm/code/SLCD_minus_mod/#507f2bd66aa9
diff -r 1d559bac561a -r 29c6ba524263 acc_341.cpp --- a/acc_341.cpp Sun Nov 06 23:56:18 2016 +0000 +++ b/acc_341.cpp Mon Nov 14 15:50:33 2016 +0000 @@ -44,8 +44,8 @@ } void LCDsignedFloat(float theNumber){ - sprintf (lcdData,"%3.2f",theNumber); - if (theNumber < 0.0) sprintf (lcdData,">%3.2f",fabs(theNumber)); + sprintf (lcdData," %3.2f",theNumber); + if (theNumber < 0.0) sprintf (lcdData,"<%3.2f",fabs(theNumber)); LCDMess(lcdData); } @@ -76,7 +76,7 @@ pc.printf("zAcc = %f\r\n", zAcc); #endif - LCDsignedFloat(zAcc); + LCDsignedFloat(xAcc); // Wait then do the whole thing again. } }