2025-05-16 21:06:31 +03:00
|
|
|
#pragma once
|
|
|
|
#include "config.h"
|
|
|
|
#include "STM32_CAN.h"
|
|
|
|
#include "flash.h"
|
|
|
|
#include "reg_cah.h"
|
|
|
|
|
|
|
|
extern FLASH_RECORD *flash_rec;
|
|
|
|
extern volatile uint16_t msg_id;
|
|
|
|
extern volatile uint16_t id_x;
|
|
|
|
extern volatile uint8_t msg_ch;
|
|
|
|
extern volatile uint8_t crc_h;
|
|
|
|
extern volatile uint8_t crc_l;
|
|
|
|
|
|
|
|
|
|
|
|
void send_velocity();
|
|
|
|
void send_angle();
|
|
|
|
void send_motor_enabled();
|
|
|
|
void send_motor_enabled();
|
|
|
|
void send_id();
|
2025-05-23 09:10:51 +03:00
|
|
|
void firmware_update();
|
2025-05-16 21:06:31 +03:00
|
|
|
// void send_motor_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);
|