mirror of https://github.com/ArduPilot/ardupilot
646 lines
21 KiB
C
646 lines
21 KiB
C
// ESCVelocityProtocol.c was generated by ProtoGen version 3.2.a
|
|
|
|
/*
|
|
* This file is free software: you can redistribute it and/or modify it
|
|
* under the terms of the GNU General Public License as published by the
|
|
* Free Software Foundation, either version 3 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This file is distributed in the hope that it will be useful, but
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
* See the GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License along
|
|
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
*
|
|
* Author: Oliver Walters
|
|
*/
|
|
|
|
#include "ESCVelocityProtocol.h"
|
|
|
|
/*!
|
|
* \brief Lookup label for 'ESCOperatingModes' enum entry
|
|
*
|
|
* \param value is the integer value of the enum entry
|
|
* \return string label of the given entry
|
|
*/
|
|
const char* ESCOperatingModes_EnumLabel(int value)
|
|
{
|
|
switch (value)
|
|
{
|
|
default:
|
|
return "";
|
|
case ESC_MODE_STANDBY:
|
|
return translateESCVelocity("ESC_MODE_STANDBY");
|
|
case ESC_MODE_PWM:
|
|
return translateESCVelocity("ESC_MODE_PWM");
|
|
case ESC_MODE_RPM:
|
|
return translateESCVelocity("ESC_MODE_RPM");
|
|
case ESC_VALID_MODES:
|
|
return translateESCVelocity("ESC_VALID_MODES");
|
|
}
|
|
}
|
|
|
|
|
|
/*!
|
|
* \brief Lookup label for 'ESCCommandSources' enum entry
|
|
*
|
|
* \param value is the integer value of the enum entry
|
|
* \return string label of the given entry
|
|
*/
|
|
const char* ESCCommandSources_EnumLabel(int value)
|
|
{
|
|
switch (value)
|
|
{
|
|
default:
|
|
return "";
|
|
case ESC_COMMAND_SOURCE_NONE:
|
|
return translateESCVelocity("ESC_COMMAND_SOURCE_NONE");
|
|
case ESC_COMMAND_SOURCE_CAN:
|
|
return translateESCVelocity("ESC_COMMAND_SOURCE_CAN");
|
|
case ESC_COMMAND_SOURCE_PWM:
|
|
return translateESCVelocity("ESC_COMMAND_SOURCE_PWM");
|
|
}
|
|
}
|
|
|
|
|
|
/*!
|
|
* \brief Lookup label for 'ESCMotorTemperatureSensor' enum entry
|
|
*
|
|
* \param value is the integer value of the enum entry
|
|
* \return string label of the given entry
|
|
*/
|
|
const char* ESCMotorTemperatureSensor_EnumLabel(int value)
|
|
{
|
|
switch (value)
|
|
{
|
|
default:
|
|
return "";
|
|
case ESC_MOTOR_TEMP_SENSOR_OFF:
|
|
return translateESCVelocity("ESC_MOTOR_TEMP_SENSOR_OFF");
|
|
case ESC_MOTOR_TEMP_SENSOR_KTY84:
|
|
return translateESCVelocity("ESC_MOTOR_TEMP_SENSOR_KTY84");
|
|
case ESC_MOTOR_TEMP_SENSOR_KTY83:
|
|
return translateESCVelocity("ESC_MOTOR_TEMP_SENSOR_KTY83");
|
|
case ESC_MOTOR_TEMP_SENSOR_CUSTOM:
|
|
return translateESCVelocity("ESC_MOTOR_TEMP_SENSOR_CUSTOM");
|
|
}
|
|
}
|
|
|
|
|
|
/*!
|
|
* \brief Lookup label for 'ESCCommandPriorities' enum entry
|
|
*
|
|
* \param value is the integer value of the enum entry
|
|
* \return string label of the given entry
|
|
*/
|
|
const char* ESCCommandPriorities_EnumLabel(int value)
|
|
{
|
|
switch (value)
|
|
{
|
|
default:
|
|
return "";
|
|
case ESC_COMMAND_PRIORITY_CAN_ONLY:
|
|
return translateESCVelocity("ESC_COMMAND_PRIORITY_CAN_ONLY");
|
|
case ESC_COMMAND_PRIORITY_CAN_PRIORITY:
|
|
return translateESCVelocity("ESC_COMMAND_PRIORITY_CAN_PRIORITY");
|
|
case ESC_COMMAND_PRIORITY_PWM_PRIORITY:
|
|
return translateESCVelocity("ESC_COMMAND_PRIORITY_PWM_PRIORITY");
|
|
}
|
|
}
|
|
|
|
|
|
/*!
|
|
* \brief Lookup label for 'ESCMotorDirection' enum entry
|
|
*
|
|
* \param value is the integer value of the enum entry
|
|
* \return string label of the given entry
|
|
*/
|
|
const char* ESCMotorDirection_EnumLabel(int value)
|
|
{
|
|
switch (value)
|
|
{
|
|
default:
|
|
return "";
|
|
case ESC_MOTOR_DIR_ABC:
|
|
return translateESCVelocity("ESC_MOTOR_DIR_ABC");
|
|
case ESC_MOTOR_DIR_ACB:
|
|
return translateESCVelocity("ESC_MOTOR_DIR_ACB");
|
|
case ESC_MOTOR_DIR_OTHER:
|
|
return translateESCVelocity("ESC_MOTOR_DIR_OTHER");
|
|
}
|
|
}
|
|
|
|
|
|
/*!
|
|
* \brief Lookup label for 'ESCHallSensorMode' enum entry
|
|
*
|
|
* \param value is the integer value of the enum entry
|
|
* \return string label of the given entry
|
|
*/
|
|
const char* ESCHallSensorMode_EnumLabel(int value)
|
|
{
|
|
switch (value)
|
|
{
|
|
default:
|
|
return "";
|
|
case ESC_HALL_MODE_SENSORLESS:
|
|
return translateESCVelocity("ESC_HALL_MODE_SENSORLESS");
|
|
case ESC_HALL_MODE_SENSORED:
|
|
return translateESCVelocity("ESC_HALL_MODE_SENSORED");
|
|
case ESC_HALL_MODE_SENSORED_STARTING:
|
|
return translateESCVelocity("ESC_HALL_MODE_SENSORED_STARTING");
|
|
}
|
|
}
|
|
|
|
|
|
/*!
|
|
* \brief Lookup label for 'ESCAFWModes' enum entry
|
|
*
|
|
* \param value is the integer value of the enum entry
|
|
* \return string label of the given entry
|
|
*/
|
|
const char* ESCAFWModes_EnumLabel(int value)
|
|
{
|
|
switch (value)
|
|
{
|
|
default:
|
|
return "";
|
|
case ESC_AFW_MODE_OFF:
|
|
return translateESCVelocity("ESC_AFW_MODE_OFF");
|
|
case ESC_AFW_MODE_ON:
|
|
return translateESCVelocity("ESC_AFW_MODE_ON");
|
|
case ESC_AFW_MODE_DYNAMIC:
|
|
return translateESCVelocity("ESC_AFW_MODE_DYNAMIC");
|
|
case ESC_AFW_MODE_OTHER:
|
|
return translateESCVelocity("ESC_AFW_MODE_OTHER");
|
|
}
|
|
}
|
|
|
|
|
|
/*!
|
|
* \brief Lookup label for 'ESCPWMFreqModes' enum entry
|
|
*
|
|
* \param value is the integer value of the enum entry
|
|
* \return string label of the given entry
|
|
*/
|
|
const char* ESCPWMFreqModes_EnumLabel(int value)
|
|
{
|
|
switch (value)
|
|
{
|
|
default:
|
|
return "";
|
|
case ESC_PWM_FREQ_FIXED:
|
|
return translateESCVelocity("ESC_PWM_FREQ_FIXED");
|
|
case ESC_PWM_FREQ_RAMP:
|
|
return translateESCVelocity("ESC_PWM_FREQ_RAMP");
|
|
case ESC_PWM_FREQ_OTHER:
|
|
return translateESCVelocity("ESC_PWM_FREQ_OTHER");
|
|
}
|
|
}
|
|
|
|
|
|
/*!
|
|
* \brief Lookup label for 'ESCTimingAdvanceModes' enum entry
|
|
*
|
|
* \param value is the integer value of the enum entry
|
|
* \return string label of the given entry
|
|
*/
|
|
const char* ESCTimingAdvanceModes_EnumLabel(int value)
|
|
{
|
|
switch (value)
|
|
{
|
|
default:
|
|
return "";
|
|
case ESC_TIMING_ADVANCE_MODE_FIXED:
|
|
return translateESCVelocity("ESC_TIMING_ADVANCE_MODE_FIXED");
|
|
case ESC_TIMING_ADVANCE_MODE_RAMP:
|
|
return translateESCVelocity("ESC_TIMING_ADVANCE_MODE_RAMP");
|
|
case ESC_TIMING_ADVANCE_MODE_OTHER:
|
|
return translateESCVelocity("ESC_TIMING_ADVANCE_MODE_OTHER");
|
|
}
|
|
}
|
|
|
|
|
|
/*!
|
|
* \brief Lookup label for 'ESCProtectionActions' enum entry
|
|
*
|
|
* \param value is the integer value of the enum entry
|
|
* \return string label of the given entry
|
|
*/
|
|
const char* ESCProtectionActions_EnumLabel(int value)
|
|
{
|
|
switch (value)
|
|
{
|
|
default:
|
|
return "";
|
|
case ESC_PROTECTION_WARNING:
|
|
return translateESCVelocity("ESC_PROTECTION_WARNING");
|
|
case ESC_PROTECTION_FOLDBACK:
|
|
return translateESCVelocity("ESC_PROTECTION_FOLDBACK");
|
|
case ESC_PROTECTION_DISABLE:
|
|
return translateESCVelocity("ESC_PROTECTION_DISABLE");
|
|
case ESC_PROTECTION_INVALID:
|
|
return translateESCVelocity("ESC_PROTECTION_INVALID");
|
|
}
|
|
}
|
|
|
|
|
|
/*!
|
|
* \brief Lookup label for 'ESCBeepModes' enum entry
|
|
*
|
|
* \param value is the integer value of the enum entry
|
|
* \return string label of the given entry
|
|
*/
|
|
const char* ESCBeepModes_EnumLabel(int value)
|
|
{
|
|
switch (value)
|
|
{
|
|
default:
|
|
return "";
|
|
case ESC_BEEP_NONE:
|
|
return translateESCVelocity("ESC_BEEP_NONE");
|
|
case ESC_BEEP_STATUS:
|
|
return translateESCVelocity("ESC_BEEP_STATUS");
|
|
case ESC_BEEP_ERROR:
|
|
return translateESCVelocity("ESC_BEEP_ERROR");
|
|
case ESC_BEEP_ALL:
|
|
return translateESCVelocity("ESC_BEEP_ALL");
|
|
}
|
|
}
|
|
|
|
|
|
/*!
|
|
* \brief Lookup label for 'ESCStandbyCause' enum entry
|
|
*
|
|
* \param value is the integer value of the enum entry
|
|
* \return string label of the given entry
|
|
*/
|
|
const char* ESCStandbyCause_EnumLabel(int value)
|
|
{
|
|
switch (value)
|
|
{
|
|
default:
|
|
return "";
|
|
case ESC_STANDBY_CAUSE_CMD:
|
|
return translateESCVelocity("ESC_STANDBY_CAUSE_CMD");
|
|
case ESC_STANDBY_CAUSE_INHIBIT:
|
|
return translateESCVelocity("ESC_STANDBY_CAUSE_INHIBIT");
|
|
case ESC_STANDBY_CAUSE_TIMEOUT:
|
|
return translateESCVelocity("ESC_STANDBY_CAUSE_TIMEOUT");
|
|
case ESC_STANDBY_CAUSE_HALL_SENSOR_ERROR:
|
|
return translateESCVelocity("ESC_STANDBY_CAUSE_HALL_SENSOR_ERROR");
|
|
case ESC_STANDBY_CAUSE_INVALID_CMD:
|
|
return translateESCVelocity("ESC_STANDBY_CAUSE_INVALID_CMD");
|
|
case ESC_STANDBY_CAUSE_PWM_ARM:
|
|
return translateESCVelocity("ESC_STANDBY_CAUSE_PWM_ARM");
|
|
case ESC_STANDBY_CAUSE_FAILED_START:
|
|
return translateESCVelocity("ESC_STANDBY_CAUSE_FAILED_START");
|
|
case ESC_STANDBY_CAUSE_MIN_CMD:
|
|
return translateESCVelocity("ESC_STANDBY_CAUSE_MIN_CMD");
|
|
case ESC_STANDBY_CAUSE_FAILED_RESYNC:
|
|
return translateESCVelocity("ESC_STANDBY_CAUSE_FAILED_RESYNC");
|
|
case ESC_STANDBY_CAUSE_RESET:
|
|
return translateESCVelocity("ESC_STANDBY_CAUSE_RESET");
|
|
}
|
|
}
|
|
|
|
|
|
/*!
|
|
* \brief Lookup label for 'ESCDisableCause' enum entry
|
|
*
|
|
* \param value is the integer value of the enum entry
|
|
* \return string label of the given entry
|
|
*/
|
|
const char* ESCDisableCause_EnumLabel(int value)
|
|
{
|
|
switch (value)
|
|
{
|
|
default:
|
|
return "";
|
|
case ESC_DISABLE_CAUSE_NONE:
|
|
return translateESCVelocity("ESC_DISABLE_CAUSE_NONE");
|
|
case ESC_DISABLE_CAUSE_CAN_CMD:
|
|
return translateESCVelocity("ESC_DISABLE_CAUSE_CAN_CMD");
|
|
case ESC_DISABLE_CAUSE_PWM_TIMEOUT:
|
|
return translateESCVelocity("ESC_DISABLE_CAUSE_PWM_TIMEOUT");
|
|
case ESC_DISABLE_CAUSE_HARDWARE:
|
|
return translateESCVelocity("ESC_DISABLE_CAUSE_HARDWARE");
|
|
case ESC_DISABLE_CAUSE_OVERCURRENT:
|
|
return translateESCVelocity("ESC_DISABLE_CAUSE_OVERCURRENT");
|
|
case ESC_DISABLE_CAUSE_OVERSPEED:
|
|
return translateESCVelocity("ESC_DISABLE_CAUSE_OVERSPEED");
|
|
case ESC_DISABLE_CAUSE_OVERTEMP:
|
|
return translateESCVelocity("ESC_DISABLE_CAUSE_OVERTEMP");
|
|
case ESC_DISABLE_CAUSE_UNDERVOLTAGE:
|
|
return translateESCVelocity("ESC_DISABLE_CAUSE_UNDERVOLTAGE");
|
|
case ESC_DISABLE_CAUSE_FAILED_START:
|
|
return translateESCVelocity("ESC_DISABLE_CAUSE_FAILED_START");
|
|
case ESC_DISABLE_CAUSE_COMMUTATION_ERROR:
|
|
return translateESCVelocity("ESC_DISABLE_CAUSE_COMMUTATION_ERROR");
|
|
case ESC_DISABLE_CAUSE_INVALID_STATE:
|
|
return translateESCVelocity("ESC_DISABLE_CAUSE_INVALID_STATE");
|
|
case ESC_DISABLE_CAUSE_RESET:
|
|
return translateESCVelocity("ESC_DISABLE_CAUSE_RESET");
|
|
}
|
|
}
|
|
|
|
|
|
/*!
|
|
* \brief Lookup label for 'ESCMotorOffCause' enum entry
|
|
*
|
|
* \param value is the integer value of the enum entry
|
|
* \return string label of the given entry
|
|
*/
|
|
const char* ESCMotorOffCause_EnumLabel(int value)
|
|
{
|
|
switch (value)
|
|
{
|
|
default:
|
|
return "";
|
|
case ESC_MOTOR_OFF_STANDBY:
|
|
return translateESCVelocity("ESC_MOTOR_OFF_STANDBY");
|
|
case ESC_MOTOR_OFF_BEEP:
|
|
return translateESCVelocity("ESC_MOTOR_OFF_BEEP");
|
|
case ESC_MOTOR_OFF_INITIALISE:
|
|
return translateESCVelocity("ESC_MOTOR_OFF_INITIALISE");
|
|
case ESC_MOTOR_OFF_INHIBITED:
|
|
return translateESCVelocity("ESC_MOTOR_OFF_INHIBITED");
|
|
case ESC_MOTOR_OFF_THROTTLE_MIN:
|
|
return translateESCVelocity("ESC_MOTOR_OFF_THROTTLE_MIN");
|
|
case ESC_MOTOR_OFF_NOT_RUNNING:
|
|
return translateESCVelocity("ESC_MOTOR_OFF_NOT_RUNNING");
|
|
case ESC_MOTOR_OFF_FAILED_START:
|
|
return translateESCVelocity("ESC_MOTOR_OFF_FAILED_START");
|
|
case ESC_MOTOR_OFF_INVALID:
|
|
return translateESCVelocity("ESC_MOTOR_OFF_INVALID");
|
|
}
|
|
}
|
|
|
|
|
|
/*!
|
|
* \brief Lookup label for 'ESCFailedStartCause' enum entry
|
|
*
|
|
* \param value is the integer value of the enum entry
|
|
* \return string label of the given entry
|
|
*/
|
|
const char* ESCFailedStartCause_EnumLabel(int value)
|
|
{
|
|
switch (value)
|
|
{
|
|
default:
|
|
return "";
|
|
case ESC_FAILED_START_CAUSE_RESET:
|
|
return translateESCVelocity("ESC_FAILED_START_CAUSE_RESET");
|
|
case ESC_FAILED_START_CAUSE_TIMEOUT:
|
|
return translateESCVelocity("ESC_FAILED_START_CAUSE_TIMEOUT");
|
|
case ESC_FAILED_START_CAUSE_OVERSPEED:
|
|
return translateESCVelocity("ESC_FAILED_START_CAUSE_OVERSPEED");
|
|
case ESC_FAILED_START_CAUSE_OVERCURRENT:
|
|
return translateESCVelocity("ESC_FAILED_START_CAUSE_OVERCURRENT");
|
|
case ESC_FAILED_START_CAUSE_SPIN_REVERSED:
|
|
return translateESCVelocity("ESC_FAILED_START_CAUSE_SPIN_REVERSED");
|
|
case ESC_FAILED_START_CAUSE_SPIN_TOO_FAST:
|
|
return translateESCVelocity("ESC_FAILED_START_CAUSE_SPIN_TOO_FAST");
|
|
case ESC_FAILED_START_CAUSE_INVALID:
|
|
return translateESCVelocity("ESC_FAILED_START_CAUSE_INVALID");
|
|
}
|
|
}
|
|
|
|
|
|
/*!
|
|
* \brief Lookup label for 'ESCMultiCommandPackets' enum entry
|
|
*
|
|
* \param value is the integer value of the enum entry
|
|
* \return string label of the given entry
|
|
*/
|
|
const char* ESCMultiCommandPackets_EnumLabel(int value)
|
|
{
|
|
switch (value)
|
|
{
|
|
default:
|
|
return "";
|
|
case PKT_ESC_SETPOINT_1:
|
|
return translateESCVelocity("PKT_ESC_SETPOINT_1");
|
|
case PKT_ESC_SETPOINT_2:
|
|
return translateESCVelocity("PKT_ESC_SETPOINT_2");
|
|
case PKT_ESC_SETPOINT_3:
|
|
return translateESCVelocity("PKT_ESC_SETPOINT_3");
|
|
case PKT_ESC_SETPOINT_4:
|
|
return translateESCVelocity("PKT_ESC_SETPOINT_4");
|
|
case PKT_ESC_SETPOINT_5:
|
|
return translateESCVelocity("PKT_ESC_SETPOINT_5");
|
|
case PKT_ESC_SETPOINT_6:
|
|
return translateESCVelocity("PKT_ESC_SETPOINT_6");
|
|
case PKT_ESC_SETPOINT_7:
|
|
return translateESCVelocity("PKT_ESC_SETPOINT_7");
|
|
case PKT_ESC_SETPOINT_8:
|
|
return translateESCVelocity("PKT_ESC_SETPOINT_8");
|
|
case PKT_ESC_SETPOINT_9:
|
|
return translateESCVelocity("PKT_ESC_SETPOINT_9");
|
|
case PKT_ESC_SETPOINT_10:
|
|
return translateESCVelocity("PKT_ESC_SETPOINT_10");
|
|
case PKT_ESC_SETPOINT_11:
|
|
return translateESCVelocity("PKT_ESC_SETPOINT_11");
|
|
case PKT_ESC_SETPOINT_12:
|
|
return translateESCVelocity("PKT_ESC_SETPOINT_12");
|
|
case PKT_ESC_SETPOINT_13:
|
|
return translateESCVelocity("PKT_ESC_SETPOINT_13");
|
|
case PKT_ESC_SETPOINT_14:
|
|
return translateESCVelocity("PKT_ESC_SETPOINT_14");
|
|
case PKT_ESC_SETPOINT_15:
|
|
return translateESCVelocity("PKT_ESC_SETPOINT_15");
|
|
case PKT_ESC_SETPOINT_16:
|
|
return translateESCVelocity("PKT_ESC_SETPOINT_16");
|
|
}
|
|
}
|
|
|
|
|
|
/*!
|
|
* \brief Lookup label for 'ESCCommandPackets' enum entry
|
|
*
|
|
* \param value is the integer value of the enum entry
|
|
* \return string label of the given entry
|
|
*/
|
|
const char* ESCCommandPackets_EnumLabel(int value)
|
|
{
|
|
switch (value)
|
|
{
|
|
default:
|
|
return "";
|
|
case PKT_ESC_PWM_CMD:
|
|
return translateESCVelocity("PKT_ESC_PWM_CMD");
|
|
case PKT_ESC_RPM_CMD:
|
|
return translateESCVelocity("PKT_ESC_RPM_CMD");
|
|
case PKT_ESC_DISABLE:
|
|
return translateESCVelocity("PKT_ESC_DISABLE");
|
|
case PKT_ESC_STANDBY:
|
|
return translateESCVelocity("PKT_ESC_STANDBY");
|
|
}
|
|
}
|
|
|
|
|
|
/*!
|
|
* \brief Lookup label for 'ESCStatusPackets' enum entry
|
|
*
|
|
* \param value is the integer value of the enum entry
|
|
* \return string label of the given entry
|
|
*/
|
|
const char* ESCStatusPackets_EnumLabel(int value)
|
|
{
|
|
switch (value)
|
|
{
|
|
default:
|
|
return "";
|
|
case PKT_ESC_STATUS_A:
|
|
return translateESCVelocity("PKT_ESC_STATUS_A");
|
|
case PKT_ESC_STATUS_B:
|
|
return translateESCVelocity("PKT_ESC_STATUS_B");
|
|
case PKT_ESC_STATUS_C:
|
|
return translateESCVelocity("PKT_ESC_STATUS_C");
|
|
case PKT_ESC_STATUS_D:
|
|
return translateESCVelocity("PKT_ESC_STATUS_D");
|
|
case PKT_ESC_ACCELEROMETER:
|
|
return translateESCVelocity("PKT_ESC_ACCELEROMETER");
|
|
}
|
|
}
|
|
|
|
|
|
/*!
|
|
* \brief Lookup label for 'ESCPackets' enum entry
|
|
*
|
|
* \param value is the integer value of the enum entry
|
|
* \return string label of the given entry
|
|
*/
|
|
const char* ESCPackets_EnumLabel(int value)
|
|
{
|
|
switch (value)
|
|
{
|
|
default:
|
|
return "";
|
|
case PKT_ESC_SYSTEM_CMD:
|
|
return translateESCVelocity("PKT_ESC_SYSTEM_CMD");
|
|
case PKT_ESC_SET_TITLE:
|
|
return translateESCVelocity("PKT_ESC_SET_TITLE");
|
|
case PKT_ESC_CONTROL_LOOP_DATA:
|
|
return translateESCVelocity("PKT_ESC_CONTROL_LOOP_DATA");
|
|
case PKT_ESC_WARNINGS_ERRORS:
|
|
return translateESCVelocity("PKT_ESC_WARNINGS_ERRORS");
|
|
case PKT_ESC_MOTOR_FLAGS:
|
|
return translateESCVelocity("PKT_ESC_MOTOR_FLAGS");
|
|
case PKT_ESC_EVENT:
|
|
return translateESCVelocity("PKT_ESC_EVENT");
|
|
case PKT_ESC_SERIAL_NUMBER:
|
|
return translateESCVelocity("PKT_ESC_SERIAL_NUMBER");
|
|
case PKT_ESC_TITLE:
|
|
return translateESCVelocity("PKT_ESC_TITLE");
|
|
case PKT_ESC_FIRMWARE:
|
|
return translateESCVelocity("PKT_ESC_FIRMWARE");
|
|
case PKT_ESC_SYSTEM_INFO:
|
|
return translateESCVelocity("PKT_ESC_SYSTEM_INFO");
|
|
case PKT_ESC_TELEMETRY_SETTINGS:
|
|
return translateESCVelocity("PKT_ESC_TELEMETRY_SETTINGS");
|
|
case PKT_ESC_EEPROM:
|
|
return translateESCVelocity("PKT_ESC_EEPROM");
|
|
case PKT_ESC_EXTRA:
|
|
return translateESCVelocity("PKT_ESC_EXTRA");
|
|
case PKT_ESC_COMMISSIONING:
|
|
return translateESCVelocity("PKT_ESC_COMMISSIONING");
|
|
case PKT_ESC_TELLTALES:
|
|
return translateESCVelocity("PKT_ESC_TELLTALES");
|
|
case PKT_ESC_GIT_HASH:
|
|
return translateESCVelocity("PKT_ESC_GIT_HASH");
|
|
case PKT_ESC_LEGACY_MOTOR_STATUS:
|
|
return translateESCVelocity("PKT_ESC_LEGACY_MOTOR_STATUS");
|
|
case PKT_ESC_LEGACY_MOTOR_SETTINGS:
|
|
return translateESCVelocity("PKT_ESC_LEGACY_MOTOR_SETTINGS");
|
|
case PKT_ESC_LEGACY_MOTOR_SETTINGS_2:
|
|
return translateESCVelocity("PKT_ESC_LEGACY_MOTOR_SETTINGS_2");
|
|
case PKT_ESC_LEGACY_MOTOR_FIRMWARE:
|
|
return translateESCVelocity("PKT_ESC_LEGACY_MOTOR_FIRMWARE");
|
|
case PKT_ESC_MOTOR_SETTINGS:
|
|
return translateESCVelocity("PKT_ESC_MOTOR_SETTINGS");
|
|
case PKT_ESC_MOTOR_STARTING:
|
|
return translateESCVelocity("PKT_ESC_MOTOR_STARTING");
|
|
case PKT_ESC_MOTOR_PARAMETERS:
|
|
return translateESCVelocity("PKT_ESC_MOTOR_PARAMETERS");
|
|
case PKT_ESC_CONFIG:
|
|
return translateESCVelocity("PKT_ESC_CONFIG");
|
|
case PKT_ESC_WARNINGS:
|
|
return translateESCVelocity("PKT_ESC_WARNINGS");
|
|
case PKT_ESC_PROTECTION_LEVELS:
|
|
return translateESCVelocity("PKT_ESC_PROTECTION_LEVELS");
|
|
case PKT_ESC_PROTECTION_ACTIONS:
|
|
return translateESCVelocity("PKT_ESC_PROTECTION_ACTIONS");
|
|
case PKT_ESC_RPM_LOOP_SETTINGS:
|
|
return translateESCVelocity("PKT_ESC_RPM_LOOP_SETTINGS");
|
|
case PKT_ESC_STARTING_SETTINGS:
|
|
return translateESCVelocity("PKT_ESC_STARTING_SETTINGS");
|
|
case PKT_ESC_CURRENT_CALIBRATION:
|
|
return translateESCVelocity("PKT_ESC_CURRENT_CALIBRATION");
|
|
case PKT_ESC_IO_TABLE_SETTINGS:
|
|
return translateESCVelocity("PKT_ESC_IO_TABLE_SETTINGS");
|
|
case PKT_ESC_IO_TABLE_ELEMENT:
|
|
return translateESCVelocity("PKT_ESC_IO_TABLE_ELEMENT");
|
|
case PKT_ESC_THROTTLE_CURVE:
|
|
return translateESCVelocity("PKT_ESC_THROTTLE_CURVE");
|
|
case PKT_ESC_PWM_INPUT_CALIBRATION:
|
|
return translateESCVelocity("PKT_ESC_PWM_INPUT_CALIBRATION");
|
|
case PKT_ESC_BULK_TRANSFER:
|
|
return translateESCVelocity("PKT_ESC_BULK_TRANSFER");
|
|
}
|
|
}
|
|
|
|
|
|
/*!
|
|
* \brief Lookup label for 'ESCSystemCommands' enum entry
|
|
*
|
|
* \param value is the integer value of the enum entry
|
|
* \return string label of the given entry
|
|
*/
|
|
const char* ESCSystemCommands_EnumLabel(int value)
|
|
{
|
|
switch (value)
|
|
{
|
|
default:
|
|
return "";
|
|
case CMD_ESC_SET_NODE_ID:
|
|
return translateESCVelocity("CMD_ESC_SET_NODE_ID");
|
|
case CMD_ESC_SET_USER_ID_A:
|
|
return translateESCVelocity("CMD_ESC_SET_USER_ID_A");
|
|
case CMD_ESC_SET_USER_ID_B:
|
|
return translateESCVelocity("CMD_ESC_SET_USER_ID_B");
|
|
case CMD_ESC_TARE_CURRENT:
|
|
return translateESCVelocity("CMD_ESC_TARE_CURRENT");
|
|
case CMD_ESC_IDENTIFY:
|
|
return translateESCVelocity("CMD_ESC_IDENTIFY");
|
|
case CMD_ESC_REQUEST_HF_DATA:
|
|
return translateESCVelocity("CMD_ESC_REQUEST_HF_DATA");
|
|
case CMD_ESC_CONFIGURE_IO_MAP:
|
|
return translateESCVelocity("CMD_ESC_CONFIGURE_IO_MAP");
|
|
case CMD_ESC_CONFIGURE_IO_ELEMENT:
|
|
return translateESCVelocity("CMD_ESC_CONFIGURE_IO_ELEMENT");
|
|
case CMD_ESC_RESET_SETTINGS:
|
|
return translateESCVelocity("CMD_ESC_RESET_SETTINGS");
|
|
case CMD_ESC_ENTER_DEBUG:
|
|
return translateESCVelocity("CMD_ESC_ENTER_DEBUG");
|
|
case CMD_ESC_EXIT_DEBUG:
|
|
return translateESCVelocity("CMD_ESC_EXIT_DEBUG");
|
|
case CMD_ESC_UNLOCK_SETTINGS:
|
|
return translateESCVelocity("CMD_ESC_UNLOCK_SETTINGS");
|
|
case CMD_ESC_LOCK_SETTINGS:
|
|
return translateESCVelocity("CMD_ESC_LOCK_SETTINGS");
|
|
case CMD_ESC_VALIDATE_SETTINGS:
|
|
return translateESCVelocity("CMD_ESC_VALIDATE_SETTINGS");
|
|
case CMD_ESC_RESET_MOTOR_RUN_TIME:
|
|
return translateESCVelocity("CMD_ESC_RESET_MOTOR_RUN_TIME");
|
|
case CMD_ESC_ENTER_BOOTLOADER:
|
|
return translateESCVelocity("CMD_ESC_ENTER_BOOTLOADER");
|
|
case CMD_ESC_RESET:
|
|
return translateESCVelocity("CMD_ESC_RESET");
|
|
}
|
|
}
|
|
|
|
// end of ESCVelocityProtocol.c
|