Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of TVDctrller2017_brdRev1_ver6 by
Diff: Global.h
- Revision:
- 39:c05074379713
- Parent:
- 38:11753ee9734f
- Child:
- 40:8e33c60c6590
--- a/Global.h Tue Oct 24 10:19:51 2017 +0000 +++ b/Global.h Thu Oct 26 02:04:02 2017 +0000 @@ -2,8 +2,9 @@ #define GLOBAL_H //制御周期 -const int CONTROL_CYCLE_MS = 10; -const float CONTROL_CYCLE_S = 0.01; +const float CONTROL_CYCLE_S = 0.01f; +const int CONTROL_CYCLE_MS = (int)(CONTROL_CYCLE_S * 1000.0f); +const int CONTROL_CYCLE_US = (int)(CONTROL_CYCLE_S * 1000000.0f); const float LSB_MOTORSPEED = 0.01; //[(m/s) / bit] @@ -24,9 +25,9 @@ LEFT }; -#define M_PI 3.1415f //[-] +const float M_PI =3.1415f; //[-] -#define ratioLPF 0.67f //各センサLPF:CutOff:20Hz +#define ratioLPF 0.67f //各センサLPF:CutOff:20Hz #define myAbs(x) (((x)>0)?(x):(-(x)))