albatross / Mbed 2 deprecated ControlYokutan2018

Dependencies:   Control_Yokutan_CANver1 XBusServo mbed mbed-rtos

Fork of ControlYokutan2017_2 by albatross

Files at this revision

API Documentation at this revision

Comitter:
tsumagari
Date:
Sat Mar 18 14:10:10 2017 +0000
Branch:
XBus???
Parent:
40:ad98da5da7bf
Commit message:
3?18;

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Sat Mar 11 22:42:45 2017 +0000
+++ b/main.cpp	Sat Mar 18 14:10:10 2017 +0000
@@ -164,8 +164,8 @@
 
 float SampleFloat(float f)  //小数点以下第二位を切り捨て
 {
-    int temp = ((f + 0.025) * 100.0) / 5;
-    float result = temp / 20.0;
+    int temp = ((f + 0.05) * 100.0) / 10;
+    float result = temp /10.0;
     return result;
 }