10 #ifndef PLEN2_JOINT_CONTROLLER_H
11 #define PLEN2_JOINT_CONTROLLER_H
20 class JointController;
73 enum { INIT_FLAG_ADDRESS = 0 };
76 enum { INIT_FLAG_VALUE = 3 };
79 enum { SETTINGS_HEAD_ADDRESS = 1 };
124 enum { PWM_MIN = 492 };
128 enum { PWM_MAX = 816 };
131 enum { PWM_NEUTRAL = 654 };
135 enum { PWM_MIN = 410 };
139 enum { PWM_MAX = 884 };
142 enum { PWM_NEUTRAL = 647 };
266 bool setAngle(uint8_t joint_id, int16_t angle);
281 bool setAngleDiff(uint8_t joint_id, int16_t angle_diff);
302 #endif // PLEN2_JOINT_CONTROLLER_H
const int16_t & getHomeAngle(uint8_t joint_id)
Get home angle of the joint given.
Definition: JointController.h:36
Definition: AccelerationGyroSensor.h:16
const int16_t & getMaxAngle(uint8_t joint_id)
Get max angle of the joint given.
JointController()
Constructor.
static volatile bool m_1cycle_finished
Finished flag of PWM output procedure 1 cycle.
Definition: JointController.h:153
bool setMinAngle(uint8_t joint_id, int16_t angle)
Set min angle of the joint given.
Definition: JointController.h:46
Definition: JointController.h:39
Definition: JointController.h:35
Definition: JointController.h:41
void resetSettings()
Reset the joint settings.
bool setMaxAngle(uint8_t joint_id, int16_t angle)
Set max angle of the joint given.
Management class (as namespace) of multiplexer.
Definition: JointController.h:113
static uint16_t m_pwms[JOINTS_SUM]
PWM buffer.
Definition: JointController.h:163
Definition: JointController.h:34
bool setAngleDiff(uint8_t joint_id, int16_t angle_diff)
Set angle to "angle-diff + home-angle" of the joint given.
bool setAngle(uint8_t joint_id, int16_t angle)
Set angle of the joint given.
Definition: JointController.h:40
Definition: JointController.h:48
void loadSettings()
Load the joint settings.
Summation of the servos controllable.
Definition: JointController.h:56
BASIC_JOINT_SETTINGS
Definition: JointController.h:54
Definition: JointController.h:117
void dump()
Dump the joint settings.
const int16_t & getMinAngle(uint8_t joint_id)
Get min angle of the joint given.
Definition: JointController.h:37
Definition: JointController.h:120
Definition: JointController.h:51
Config file for each build environment.
Management class of joints.
Definition: JointController.h:29
Definition: JointController.h:43
Definition: JointController.h:38
Definition: JointController.h:49
Definition: JointController.h:44
Definition: JointController.h:45
Definition: JointController.h:50
bool setHomeAngle(uint8_t joint_id, int16_t angle)
Set home angle of the joint given.
Definition: JointController.h:42
JOINT_INDEX
Definition: JointController.h:32
Definition: JointController.h:47