TeensyNanoExoCode
Loading...
Searching...
No Matches
MotorData.h
Go to the documentation of this file.
1
11#ifndef MotorData_h
12#define MotorData_h
13
14#include "Arduino.h"
15
16#include "ParseIni.h"
17#include "Board.h"
18
19#include <stdint.h>
20
21// forward declaration
22class ExoData;
23
25{
26 public:
27 MotorData(config_defs::joint_id id, uint8_t* config_to_send);
28
34 void reconfigure(uint8_t* config_to_send);
35
37 uint8_t motor_type;
39 float p;
40 float v;
41 float i;
42 float p_des = 0;
43 float v_des = 0;
44 float kp = 0;
45 float kd = 0;
46 float t_ff = 0;
48 // add do_zero_flag and check in run.
49 bool do_zero;
50 bool enabled;
51 bool is_on;
52 bool is_left;
54 float gearing;
55};
56
57
58#endif
Declares the functions needed and defines mapping between the INI keys and the exo components.
Class to store all the data related to the exo.
Definition ExoData.h:38
Definition MotorData.h:25
float i
Definition MotorData.h:41
float p_des
Definition MotorData.h:42
bool do_zero
Definition MotorData.h:49
config_defs::joint_id id
Definition MotorData.h:36
float p
Definition MotorData.h:39
bool enabled
Definition MotorData.h:50
bool is_left
Definition MotorData.h:52
float kp
Definition MotorData.h:44
bool flip_direction
Definition MotorData.h:53
float v
Definition MotorData.h:40
void reconfigure(uint8_t *config_to_send)
reconfigures the the motor data if the configuration changes after constructor called.
Definition MotorData.cpp:166
float gearing
Definition MotorData.h:54
float v_des
Definition MotorData.h:43
float t_ff
Definition MotorData.h:46
float kd
Definition MotorData.h:45
bool is_on
Definition MotorData.h:51
uint8_t motor_type
Definition MotorData.h:37
float last_command
Definition MotorData.h:38
joint_id
Definition ParseIni.h:106