MDC3.0 rs-485 コントロールプログラム can も追加予定.... 詳細はwiki バグレポートは中田くんに,やさしく教えてください(煽り禁止)

Dependents:   quadOmni_yanagi NHK2017_octopus ikarashiMDCmaster NHK2017_octopus2 ... more

Files at this revision

API Documentation at this revision

Comitter:
WAT34
Date:
Sat Nov 11 10:50:30 2017 +0000
Parent:
12:3fa4f849d6f7
Commit message:
bugs fixed;

Changed in this revision

ikarashiMDC.cpp Show annotated file Show diff for this revision Revisions of this file
ikarashiMDC.h Show annotated file Show diff for this revision Revisions of this file
diff -r 3fa4f849d6f7 -r ea34af94e90c ikarashiMDC.cpp
--- a/ikarashiMDC.cpp	Sat Nov 11 09:42:04 2017 +0900
+++ b/ikarashiMDC.cpp	Sat Nov 11 10:50:30 2017 +0000
@@ -16,8 +16,7 @@
 {
     uint8_t data[4],dataSpeed;
     //Limiter
-    const double cropped_speed = fmin(1.0,fmax(-1.0,speed);
-
+    const double cropped_speed = std::min(1.0,std::max(-1.0,speed));
     //dataspeed 0~253 neutaral 126
     dataSpeed = ((cropped_speed+1.0)/2.0)*253;
     //printf("%d\n",dataSpeed);
diff -r 3fa4f849d6f7 -r ea34af94e90c ikarashiMDC.h
--- a/ikarashiMDC.h	Sat Nov 11 09:42:04 2017 +0900
+++ b/ikarashiMDC.h	Sat Nov 11 10:50:30 2017 +0000
@@ -2,6 +2,7 @@
 #define IKARASHIMDC_H
 
 #include "mbed.h"
+#include "algorithm"
 
 #define LAP 0
 #define SM 1