ver CAN
Revision 13:ea34af94e90c, committed 2017-11-11
- Comitter:
- WAT34
- Date:
- Sat Nov 11 10:50:30 2017 +0000
- Parent:
- 12:3fa4f849d6f7
- Child:
- 14:b1b58b74dd4c
- 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 |
--- 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);
--- 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