pbio/control: align actuation_t with passivity_t
Actuation type (for the next actuation update) is distinct from the DC motor state so they should remain a distinct type, but we want to make sure that the related states have the same value, to simplify interpreting log data.
#include <pbio/error.h>
#include <pbio/port.h>
+#include <pbio/dcmotor.h>
#include <pbio/trajectory.h>
#include <pbio/integrator.h>
#include <pbio/logger.h>
@@ -41,10 +42,10 @@ typedef struct _pbio_control_settings_t {
} pbio_control_settings_t;
typedef enum {
- PBIO_ACTUATION_COAST, /**< Coast the motor */
- PBIO_ACTUATION_BRAKE, /**< Brake the motor */
+ PBIO_ACTUATION_COAST = PBIO_DCMOTOR_COAST, /**< Coast the motor */
+ PBIO_ACTUATION_BRAKE = PBIO_DCMOTOR_BRAKE, /**< Brake the motor */
+ PBIO_ACTUATION_DUTY = PBIO_DCMOTOR_DUTY_PASSIVE, /**< Apply a given duty cycle value */
PBIO_ACTUATION_HOLD, /**< Actively hold the motor in place */
- PBIO_ACTUATION_DUTY,
} pbio_actuation_t;
// Maneuver-specific function that returns true if maneuver is done, based on current state
