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.
Dependencies: mbed-dev-f303 FastPWM3
CAN/CAN_com.h
- Committer:
- shaorui
- Date:
- 2021-04-14
- Revision:
- 55:d614e29c60c5
- Parent:
- 53:32218a36df05
File content as of revision 55:d614e29c60c5:
#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 P_MIN -25.0f
//#define P_MAX 25.0f
//#define V_MIN -65.0f
//#define V_MAX 65.0f
#define P_MIN 0.04f
#define P_MAX 6.24f
#define V_MIN -15.0f
#define V_MAX 15.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
#define T_MIN -50.0f
#define T_MAX 50.0f
void pack_reply(CANMessage *msg, float p, float v, float t);
void unpack_cmd(CANMessage msg, ControllerStruct * controller);
extern int sidebct;
#endif