-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMotor_Handler.h
31 lines (27 loc) · 1.05 KB
/
Motor_Handler.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#ifndef MOTOR_HANDLER_H
#define MOTOR_HANDLER_H
#include "Handler.h"
class Motor_Handler : public Handler {
public:
void begin();
void handleMessage(Frame& message);
void requestHeartbeat();
void requestPermanentUpdates(uint16_t can_id);
private:
void requestPermanentUpdate(uint16_t can_id, uint8_t msg_type, uint8_t time);
void handleVoltageMessage(Frame& message);
void handleTorqueMessage(Frame& message);
void handleSpeedMessage(Frame& message);
void handleErrorMessage(Frame& message);
void handleStateMessage(Frame& message);
void handleCurrentMessage(Frame& message);
void handleCurrentAfterFilterMessage(Frame& message);
void handleCurrentCommandMessage(Frame& message);
void handleAirTempMessage(Frame& message);
void handleIgbtTempMessage(Frame& message);
void handleCurrentLimitMessage(Frame& message);
int motor_speed_to_motor_rpm(const int motor_speed);
int motor_rpm_to_wheel_rpm(const int motor_speed);
int wheel_rpm_to_kph(const int wheel_rpm);
};
#endif // MOTOR_HANDLER_H