Add new process msg
This commit is contained in:
parent
66e917de4d
commit
58a051b217
5 changed files with 71 additions and 42 deletions
|
@ -19,9 +19,10 @@ void send_motor_enabled();
|
|||
void send_id();
|
||||
void firmware_update();
|
||||
void send_pid_angle(uint8_t param_pid);
|
||||
// void send_motor_torque();
|
||||
void send_torque();
|
||||
void send_pid(uint8_t param_pid);
|
||||
void setup_id(uint8_t my_id);
|
||||
void setup_angle(float target_angle);
|
||||
void setup_pid_angle(uint8_t param_pid, float data);
|
||||
void listen_can(const CAN_message_t &msg);
|
||||
void setup_velocity(float target_velocity);
|
||||
|
||||
void listen_can(const CAN_message_t &msg);
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#ifndef REG_CAH_H_
|
||||
#define REG_CAH_H_
|
||||
#pragma once
|
||||
|
||||
#define APP_ADDR 0x0800400 // 16KB - Application
|
||||
#define ADDR_VAR 0x8040000
|
||||
|
@ -16,6 +15,10 @@
|
|||
#define REG_ID 0x01
|
||||
#define REG_BAUDRATE 0x02
|
||||
|
||||
#define DATA_TYPE_ANGLE 0x03
|
||||
#define DATA_TYPE_VELOCITY 0x04
|
||||
#define DATA_TYPE_TORQUE 0x05
|
||||
|
||||
#define REG_MOTOR_POSPID_Kp 0x30
|
||||
#define REG_MOTOR_POSPID_Ki 0x31
|
||||
#define REG_MOTOR_POSPID_Kd 0x32
|
||||
|
@ -43,6 +46,3 @@
|
|||
#define CAN_MSG_MAX_LEN 7
|
||||
#define CRC_SIZE 2
|
||||
#define ID_SIZE sizeof(uint8_t)
|
||||
|
||||
|
||||
#endif // REG_CAH_H_
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue