![]() |
DUNE: Uniform Navigational Environment
2.3.2
|
Public Member Functions | |
| Task (const std::string &name, Tasks::Context &ctx) | |
| void | onUpdateParameters (void) |
| ~Task (void) | |
| void | onEntityReservation (void) |
| void | onResourceAcquisition (void) |
| void | onCommand (uint8_t cmd, const uint8_t *data, int data_size) |
| void | onVersion (unsigned major, unsigned minor, unsigned patch) |
| int16_t | sanitizeRef (int16_t value) |
| void | setRefDcycle (float value) |
| void | setRefCurrent (float value) |
| void | setRefRPM (int value) |
| void | setRefThrust (float value) |
| void | consume (const IMC::SetThrusterActuation *msg) |
| void | consume (const IMC::DesiredSpeed *msg) |
| bool | waitForCommand (uint8_t code) |
| void | task (void) |
Public Attributes | |
| Hardware::LUCL::Protocol | m_proto |
| int16_t | m_actuation |
| DevControlModes | m_ctl_mode |
| DevControlModes | m_thrust_ctl_mode |
| IMC::Rpm | m_rpms |
| IMC::Current | m_current |
| IMC::Current | m_bridge_current |
| IMC::Temperature | m_motor_temp |
| IMC::Temperature | m_bridge_temp |
| IMC::Voltage | m_bridge_volt |
| IMC::Temperature | m_mcu_temp |
| IMC::Voltage | m_mcu_volt |
| IMC::Voltage | m_motor_volt |
| double | m_last_state |
| Arguments | m_args |
| uint8_t | m_dev_errors |
| bool | m_legacy |
|
inline |
References Actuators::Broom::Arguments::bridge_elabel, Actuators::Broom::Arguments::desired_speed, Actuators::Broom::Arguments::inv_rotation, m_args, m_last_state, Actuators::Broom::Arguments::max_phase_current, Actuators::Broom::Arguments::max_rpm, Actuators::Broom::Arguments::mcu_elabel, Actuators::Broom::Arguments::motor_elabel, Actuators::Broom::Arguments::pole_pairs, Actuators::Broom::Arguments::state_per, Actuators::Broom::Arguments::thrust_ctl_mode, and Actuators::Broom::Arguments::uart_dev.
|
inline |
|
inline |
References setRefThrust().
|
inline |
References Actuators::Broom::Arguments::desired_speed, m_args, setRefRPM(), and setRefThrust().
|
inline |
References Actuators::Broom::c_dev_error_strings, Actuators::Broom::CMD_ACTUATE, Actuators::Broom::CMD_DEBUG, Actuators::Broom::CMD_STATE, Actuators::Broom::ERR_INIT, Actuators::Broom::ERR_POWER, Actuators::Broom::Arguments::inv_rotation, m_args, m_bridge_current, m_bridge_temp, m_bridge_volt, m_current, m_dev_errors, m_legacy, m_mcu_temp, m_mcu_volt, m_motor_temp, m_motor_volt, m_proto, m_rpms, and Actuators::Broom::Arguments::pole_pairs.
Referenced by waitForCommand().
|
inline |
|
inline |
References m_args, m_proto, and Actuators::Broom::Arguments::uart_dev.
|
inline |
|
inline |
References m_legacy.
Referenced by waitForCommand().
|
inline |
Sanitize the actuation reference (limits and sign)
| [in] | value | actuation reference value to be sanitized |
References Actuators::Broom::Arguments::inv_rotation, m_args, and DUNE::Math::trimValue().
Referenced by setRefCurrent(), setRefDcycle(), and setRefRPM().
|
inline |
Set phase current value as actuation reference.
| [in] | value | phase current reference in Ampere |
References m_actuation, m_args, m_ctl_mode, Actuators::Broom::Arguments::max_phase_current, Actuators::Broom::MODE_CURRENT, sanitizeRef(), and DUNE::Math::trimValue().
Referenced by setRefThrust().
|
inline |
Set percentage of duty cycle as actuation reference.
| [in] | value | percentage reference from -1.0 to 1.0 |
References m_actuation, m_ctl_mode, Actuators::Broom::MODE_VOLTAGE, sanitizeRef(), and DUNE::Math::trimValue().
Referenced by setRefThrust().
|
inline |
Set rotor Rotations Per Minute value as actuation reference.
| [in] | value | rotor angular velocity reference in Rotations Per Minute |
References m_actuation, m_args, m_ctl_mode, Actuators::Broom::MODE_RPM, Actuators::Broom::Arguments::pole_pairs, and sanitizeRef().
Referenced by consume(), and setRefThrust().
|
inline |
Set thrust actuation reference, using the mode configured for the task.
| [in] | value | percentage of thrust from -1 to 1 |
References m_args, m_ctl_mode, m_thrust_ctl_mode, Actuators::Broom::Arguments::max_phase_current, Actuators::Broom::Arguments::max_rpm, Actuators::Broom::MODE_CURRENT, Actuators::Broom::MODE_NONE, Actuators::Broom::MODE_RPM, Actuators::Broom::MODE_VOLTAGE, setRefCurrent(), setRefDcycle(), and setRefRPM().
Referenced by consume().
|
inline |
|
inline |
References m_proto, onCommand(), and onVersion().
Referenced by task().
| int16_t Actuators::Broom::Task::m_actuation |
Actuation command.
Referenced by setRefCurrent(), setRefDcycle(), setRefRPM(), and task().
| Arguments Actuators::Broom::Task::m_args |
Task arguments.
Referenced by consume(), onCommand(), onEntityReservation(), onResourceAcquisition(), onUpdateParameters(), sanitizeRef(), setRefCurrent(), setRefRPM(), setRefThrust(), Task(), and task().
| IMC::Current Actuators::Broom::Task::m_bridge_current |
Bridge current message.
Referenced by onCommand(), and onEntityReservation().
| IMC::Temperature Actuators::Broom::Task::m_bridge_temp |
Bridge temperature message.
Referenced by onCommand(), and onEntityReservation().
| IMC::Voltage Actuators::Broom::Task::m_bridge_volt |
Bridge voltage message.
Referenced by onCommand(), and onEntityReservation().
| DevControlModes Actuators::Broom::Task::m_ctl_mode |
Control mode.
Referenced by setRefCurrent(), setRefDcycle(), setRefRPM(), setRefThrust(), and task().
| IMC::Current Actuators::Broom::Task::m_current |
Motor phase current message.
Referenced by onCommand(), and onEntityReservation().
| uint8_t Actuators::Broom::Task::m_dev_errors |
Device error mask.
Referenced by onCommand(), and task().
| bool Actuators::Broom::Task::m_legacy |
Enable legacy protocol.
Referenced by onCommand(), and onVersion().
| IMC::Temperature Actuators::Broom::Task::m_mcu_temp |
MCU temperature message.
Referenced by onCommand(), and onEntityReservation().
| IMC::Voltage Actuators::Broom::Task::m_mcu_volt |
MCU voltage message.
Referenced by onCommand(), and onEntityReservation().
| IMC::Temperature Actuators::Broom::Task::m_motor_temp |
Motor temperature message.
Referenced by onCommand(), and onEntityReservation().
| IMC::Voltage Actuators::Broom::Task::m_motor_volt |
Motor voltage message.
Referenced by onCommand(), and onEntityReservation().
| Hardware::LUCL::Protocol Actuators::Broom::Task::m_proto |
Device protocol handler.
Referenced by onCommand(), onResourceAcquisition(), task(), and waitForCommand().
| IMC::Rpm Actuators::Broom::Task::m_rpms |
RPMs message.
Referenced by onCommand(), and onEntityReservation().
| DevControlModes Actuators::Broom::Task::m_thrust_ctl_mode |
Thrust control mode.
Referenced by onUpdateParameters(), and setRefThrust().
