DUNE: Uniform Navigational Environment
2019.02.1
|
Public Member Functions | |
Task (const std::string &name, Tasks::Context &ctx) | |
void | onUpdateParameters (void) |
~Task (void) | |
void | onEntityReservation (void) |
void | onResourceAcquisition (void) |
void | setup (void) |
bool | getEEPROM (uint8_t command, const uint8_t *data=NULL, size_t data_size=0) |
bool | updateConfigArea (uint8_t command, std::vector< uint8_t > &dev_values, const std::vector< uint8_t > &new_values) |
bool | setupConfigGeneral (void) |
bool | setupConfigDCYC (void) |
bool | setupConfigIADC (void) |
bool | setupConfigERPM (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 | reportEntityState (void) |
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 |
Entities::BasicEntity * | m_motor_ent |
Entities::BasicEntity * | m_bridge_ent |
Entities::BasicEntity * | m_mcu_ent |
uint8_t | m_dev_errors |
unsigned | m_motor_id |
bool | m_legacy |
Counter< double > | m_boot_timer |
Counter< double > | m_state_timer |
Counter< double > | m_wdog |
Counter< double > | m_wdog_setup |
Counter< double > | m_estate_timer |
size_t | m_sample_count |
size_t | m_faults_count |
size_t | m_timeout_count |
std::vector< unsigned > | m_version |
std::vector< uint8_t > | m_eep_config |
std::vector< uint8_t > | m_eep_dcyc |
std::vector< uint8_t > | m_eep_iadc |
std::vector< uint8_t > | m_eep_erpm |
SetupState | m_setup_state |
Arguments | m_args |
|
inline |
References Actuators::Broom::Arguments::actuation_wdt, Actuators::Broom::Arguments::bridge_elabel, Actuators::Broom::Arguments::bridge_temp_hyst, Actuators::Broom::Arguments::bridge_temp_max, Actuators::Broom::Arguments::ctl_dcyc_inc, Actuators::Broom::Arguments::ctl_dcyc_max, Actuators::Broom::Arguments::ctl_dcyc_negl, Actuators::Broom::Arguments::ctl_erpm_inc, Actuators::Broom::Arguments::ctl_erpm_max, Actuators::Broom::Arguments::ctl_erpm_negl, Actuators::Broom::Arguments::ctl_iadc_inc, Actuators::Broom::Arguments::ctl_iadc_max, Actuators::Broom::Arguments::ctl_iadc_negl, Actuators::Broom::Arguments::current_raw_offset, Actuators::Broom::Arguments::desired_speed, Actuators::Broom::Arguments::inv_rotation, Actuators::Broom::Arguments::max_rpm, Actuators::Broom::Arguments::mcu_elabel, Actuators::Broom::Arguments::motor_elabel, Actuators::Broom::Arguments::motor_id, Actuators::Broom::Arguments::motor_temp_hyst, Actuators::Broom::Arguments::motor_temp_max, Actuators::Broom::Arguments::pole_pairs, Actuators::Broom::Arguments::state_per, Actuators::Broom::Arguments::thrust_ctl_mode, Actuators::Broom::Arguments::timeout_error, Actuators::Broom::Arguments::timeout_failure, and Actuators::Broom::Arguments::uart_dev.
|
inline |
|
inline |
|
inline |
References Actuators::Broom::Arguments::desired_speed.
|
inline |
References Actuators::Broom::ERR_NONE.
|
inline |
References Actuators::Broom::CMD_ACTUATE, Actuators::Broom::CMD_CONFIG, Actuators::Broom::CMD_CONFIG_DCYC, Actuators::Broom::CMD_CONFIG_ERPM, Actuators::Broom::CMD_CONFIG_IADC, Actuators::Broom::CMD_DEBUG, Actuators::Broom::CMD_STATE, Actuators::Broom::ERR_INIT, Actuators::Broom::ERR_POWER, Actuators::Broom::Arguments::inv_rotation, and Actuators::Broom::Arguments::pole_pairs.
|
inline |
|
inline |
References Actuators::Broom::Arguments::uart_dev.
|
inline |
References Actuators::Broom::MODE_CURRENT, Actuators::Broom::MODE_NONE, Actuators::Broom::MODE_RPM, Actuators::Broom::MODE_VOLTAGE, Actuators::Broom::Arguments::motor_id, Actuators::Broom::Arguments::state_per, Actuators::Broom::Arguments::thrust_ctl_mode, and Actuators::Broom::Arguments::timeout_error.
|
inline |
|
inline |
References Actuators::Broom::Arguments::timeout_failure.
|
inline |
Sanitize the actuation reference (limits and sign)
[in] | value | actuation reference value to be sanitized |
References Actuators::Broom::Arguments::inv_rotation, and DUNE::Math::trimValue().
|
inline |
Set phase current value as actuation reference.
[in] | value | phase current reference in Ampere |
References Actuators::Broom::Arguments::ctl_iadc_max, Actuators::Broom::MODE_CURRENT, and DUNE::Math::trimValue().
|
inline |
Set percentage of duty cycle as actuation reference.
[in] | value | percentage reference from -1.0 to 1.0 |
References Actuators::Broom::MODE_VOLTAGE, and DUNE::Math::trimValue().
|
inline |
Set rotor Rotations Per Minute value as actuation reference.
[in] | value | rotor angular velocity reference in Rotations Per Minute |
References Actuators::Broom::MODE_RPM, and Actuators::Broom::Arguments::pole_pairs.
|
inline |
Set thrust actuation reference, using the mode configured for the task.
[in] | value | percentage of thrust from -1 to 1 |
References Actuators::Broom::Arguments::ctl_iadc_max, Actuators::Broom::Arguments::max_rpm, Actuators::Broom::MODE_CURRENT, Actuators::Broom::MODE_NONE, Actuators::Broom::MODE_RPM, and Actuators::Broom::MODE_VOLTAGE.
|
inline |
|
inline |
|
inline |
|
inline |
References Actuators::Broom::Arguments::actuation_wdt, Actuators::Broom::Arguments::bridge_temp_hyst, Actuators::Broom::Arguments::bridge_temp_max, Actuators::Broom::CMD_CONFIG, Actuators::Broom::Arguments::current_raw_offset, Actuators::Broom::Arguments::motor_temp_hyst, and Actuators::Broom::Arguments::motor_temp_max.
|
inline |
|
inline |
|
inline |
References Actuators::Broom::CMD_CONFIG.
|
inline |
int16_t Actuators::Broom::Task::m_actuation |
Actuation command.
Counter<double> Actuators::Broom::Task::m_boot_timer |
Used to silence some spurious boot errors.
Entities::BasicEntity* Actuators::Broom::Task::m_bridge_ent |
Bridge entity.
DevControlModes Actuators::Broom::Task::m_ctl_mode |
Control mode.
uint8_t Actuators::Broom::Task::m_dev_errors |
Device error mask.
std::vector<uint8_t> Actuators::Broom::Task::m_eep_config |
EEPROM - General Config Area.
std::vector<uint8_t> Actuators::Broom::Task::m_eep_dcyc |
EEPROM - DCYC Config Area.
std::vector<uint8_t> Actuators::Broom::Task::m_eep_erpm |
EEPROM - RPM Config Area.
std::vector<uint8_t> Actuators::Broom::Task::m_eep_iadc |
EEPROM - IADC Config Area.
Counter<double> Actuators::Broom::Task::m_estate_timer |
Entity state timer.
size_t Actuators::Broom::Task::m_faults_count |
Faults count.
bool Actuators::Broom::Task::m_legacy |
Enable legacy protocol.
Entities::BasicEntity* Actuators::Broom::Task::m_mcu_ent |
MCU entity.
Entities::BasicEntity* Actuators::Broom::Task::m_motor_ent |
Motor entity.
unsigned Actuators::Broom::Task::m_motor_id |
Motor identifier.
Hardware::LUCL::Protocol Actuators::Broom::Task::m_proto |
Device protocol handler.
IMC::Rpm Actuators::Broom::Task::m_rpms |
RPMs message.
size_t Actuators::Broom::Task::m_sample_count |
Sample count.
SetupState Actuators::Broom::Task::m_setup_state |
Setup state.
Counter<double> Actuators::Broom::Task::m_state_timer |
State update timer.
DevControlModes Actuators::Broom::Task::m_thrust_ctl_mode |
Thrust control mode.
size_t Actuators::Broom::Task::m_timeout_count |
Timeout count.
std::vector<unsigned> Actuators::Broom::Task::m_version |
Version.
Counter<double> Actuators::Broom::Task::m_wdog |
Watchdog.
Counter<double> Actuators::Broom::Task::m_wdog_setup |
Setup watchdog.