Files
foc_ccs/3rd/mt6701.h

38 lines
688 B
C
Raw Permalink Normal View History

#ifndef MT6701_H
#define MT6701_H
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
#define PI 3.14159265359f
#define _2PI 6.28318530718f
#define I2C_TX_PACKET_SIZE (1)
#define I2C_RX_PACKET_SIZE (2)
2025-11-20 16:32:17 +08:00
struct MT6701 {
int Mot_num;
float Angle;
float velocity;
float full_rotations;
float Last_Angle;
float Last_Vel_ts;
float Vel_Last_Angle;
};
void Set_Sensor(int Mot);
void MT6701_iic_read_angel(void);
void MT6701_get_angle_degree(void);
2025-11-20 16:32:17 +08:00
float GetAngle(struct MT6701 *mt6701);
float GetAngle_NoTrack(struct MT6701 *mt6701);
float GetVelocity(struct MT6701 *mt6701_Vel);
#ifdef __cplusplus
}
#endif
#endif /* MT6701_H */