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.
Diff: globalFlags.h
- Revision:
- 59:6b4dcd964d0f
- Parent:
- 56:f363a6877c6a
- Child:
- 61:49254cc00d08
--- a/globalFlags.h Thu Mar 07 10:06:34 2019 +0000 +++ b/globalFlags.h Fri Mar 08 02:30:49 2019 +0000 @@ -12,6 +12,13 @@ #include "mbed.h" #include "typedef.h" +#ifndef M_PI +#define M_PI 3.14159265358979 +#endif + +#define deg_to_rad(deg) (((deg)/360)*2*M_PI) +#define rad_to_deg(rad) (((rad)/2/M_PI)*360) + /** * @def G_CMD_BUF_SIZ * @brief コマンド受け渡しバッファサイズ @@ -33,6 +40,12 @@ #define DEF_BRK_RPM 5000 /** +* @def BRK_ANG +* @brief ブレーキボタンを押した場合の1秒間の目標角度変化量[deg] +*/ +#define DEF_BRK_ANG 5 + +/** * @def UPDATE_RATE * @brief タスクのアップデートレート 50Hz */ @@ -310,6 +323,8 @@ extern typAxlRpm gf_MtBrk; //!< モーターブレーキ時のRPM値更新 extern typAxlRpm gf_MtReqDct[8]; //!< ダイレクト(FPGA関数直接呼び出し)モーター値更新フラグ +extern typAxlRpm gf_AngBrk; //!< ブレーキ時の1秒間の目標角度変化値[deg]更新 + extern typSWCmd gf_SwCmd; //!< スイッチが押されたことを模擬するフラグ extern enmHbState gf_State; //!< 現在のステートを格納する変数