2018年度用翼端mbedプログラム
Dependencies: Control_Yokutan_CANver1 XBusServo mbed mbed-rtos
Fork of ControlYokutan2017_2 by
Diff: main.cpp
- Branch:
- XBus???
- Revision:
- 41:efebfdd955ac
- Parent:
- 40:ad98da5da7bf
--- 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; }