motor control code by JYB
Dependencies: mbed-dev-f303 FastPWM3
CAN/CAN_com.h
- Committer:
- MrStark
- Date:
- 2020-12-15
- Revision:
- 48:e9f6441bacf5
- Parent:
- 45:aadebe074af6
File content as of revision 48:e9f6441bacf5:
#ifndef CAN_COM_H #define CAN_COM_H #include "structs.h" #include "user_config.h" #include "mbed.h" #include "math_ops.h" #define P_MIN -12.5f #define P_MAX 12.5f #define V_MIN -45.0f #define V_MAX 45.0f #define KP_MIN 0.0f #define KP_MAX 500.0f #define KD_MIN 0.0f #define KD_MAX 5.0f #define T_MIN -18.0f #define T_MAX 18.0f void pack_reply(CANMessage *msg, float p, float v, float t); void unpack_cmd(CANMessage msg, ControllerStruct * controller); #endif