2020-09-24 03:40:33 -03:00
|
|
|
// ESCVelocityProtocol.c was generated by ProtoGen version 3.2.a
|
2019-12-09 00:30:58 -04:00
|
|
|
|
|
|
|
/*
|
2020-09-25 04:19:43 -03:00
|
|
|
* 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
|
2019-12-09 00:30:58 -04:00
|
|
|
*/
|
|
|
|
|
|
|
|
#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:
|
2020-09-24 03:40:33 -03:00
|
|
|
return translateESCVelocity("ESC_MODE_STANDBY");
|
2019-12-09 00:30:58 -04:00
|
|
|
case ESC_MODE_PWM:
|
2020-09-24 03:40:33 -03:00
|
|
|
return translateESCVelocity("ESC_MODE_PWM");
|
2019-12-09 00:30:58 -04:00
|
|
|
case ESC_MODE_RPM:
|
2020-09-24 03:40:33 -03:00
|
|
|
return translateESCVelocity("ESC_MODE_RPM");
|
2019-12-09 00:30:58 -04:00
|
|
|
case ESC_VALID_MODES:
|
2020-09-24 03:40:33 -03:00
|
|
|
return translateESCVelocity("ESC_VALID_MODES");
|
2019-12-09 00:30:58 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* \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:
|
2020-09-24 03:40:33 -03:00
|
|
|
return translateESCVelocity("ESC_COMMAND_SOURCE_NONE");
|
2019-12-09 00:30:58 -04:00
|
|
|
case ESC_COMMAND_SOURCE_CAN:
|
2020-09-24 03:40:33 -03:00
|
|
|
return translateESCVelocity("ESC_COMMAND_SOURCE_CAN");
|
2019-12-09 00:30:58 -04:00
|
|
|
case ESC_COMMAND_SOURCE_PWM:
|
2020-09-24 03:40:33 -03:00
|
|
|
return translateESCVelocity("ESC_COMMAND_SOURCE_PWM");
|
2019-12-09 00:30:58 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* \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:
|
2020-09-24 03:40:33 -03:00
|
|
|
return translateESCVelocity("ESC_MOTOR_TEMP_SENSOR_OFF");
|
2019-12-09 00:30:58 -04:00
|
|
|
case ESC_MOTOR_TEMP_SENSOR_KTY84:
|
2020-09-24 03:40:33 -03:00
|
|
|
return translateESCVelocity("ESC_MOTOR_TEMP_SENSOR_KTY84");
|
2019-12-09 00:30:58 -04:00
|
|
|
case ESC_MOTOR_TEMP_SENSOR_KTY83:
|
2020-09-24 03:40:33 -03:00
|
|
|
return translateESCVelocity("ESC_MOTOR_TEMP_SENSOR_KTY83");
|
|
|
|
case ESC_MOTOR_TEMP_SENSOR_CUSTOM:
|
|
|
|
return translateESCVelocity("ESC_MOTOR_TEMP_SENSOR_CUSTOM");
|
2019-12-09 00:30:58 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* \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:
|
2020-09-24 03:40:33 -03:00
|
|
|
return translateESCVelocity("ESC_COMMAND_PRIORITY_CAN_ONLY");
|
2019-12-09 00:30:58 -04:00
|
|
|
case ESC_COMMAND_PRIORITY_CAN_PRIORITY:
|
2020-09-24 03:40:33 -03:00
|
|
|
return translateESCVelocity("ESC_COMMAND_PRIORITY_CAN_PRIORITY");
|
2019-12-09 00:30:58 -04:00
|
|
|
case ESC_COMMAND_PRIORITY_PWM_PRIORITY:
|
2020-09-24 03:40:33 -03:00
|
|
|
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");
|
2019-12-09 00:30:58 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* \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:
|
2020-09-24 03:40:33 -03:00
|
|
|
return translateESCVelocity("PKT_ESC_SETPOINT_1");
|
2019-12-09 00:30:58 -04:00
|
|
|
case PKT_ESC_SETPOINT_2:
|
2020-09-24 03:40:33 -03:00
|
|
|
return translateESCVelocity("PKT_ESC_SETPOINT_2");
|
2019-12-09 00:30:58 -04:00
|
|
|
case PKT_ESC_SETPOINT_3:
|
2020-09-24 03:40:33 -03:00
|
|
|
return translateESCVelocity("PKT_ESC_SETPOINT_3");
|
2019-12-09 00:30:58 -04:00
|
|
|
case PKT_ESC_SETPOINT_4:
|
2020-09-24 03:40:33 -03:00
|
|
|
return translateESCVelocity("PKT_ESC_SETPOINT_4");
|
2019-12-09 00:30:58 -04:00
|
|
|
case PKT_ESC_SETPOINT_5:
|
2020-09-24 03:40:33 -03:00
|
|
|
return translateESCVelocity("PKT_ESC_SETPOINT_5");
|
2019-12-09 00:30:58 -04:00
|
|
|
case PKT_ESC_SETPOINT_6:
|
2020-09-24 03:40:33 -03:00
|
|
|
return translateESCVelocity("PKT_ESC_SETPOINT_6");
|
2019-12-09 00:30:58 -04:00
|
|
|
case PKT_ESC_SETPOINT_7:
|
2020-09-24 03:40:33 -03:00
|
|
|
return translateESCVelocity("PKT_ESC_SETPOINT_7");
|
2019-12-09 00:30:58 -04:00
|
|
|
case PKT_ESC_SETPOINT_8:
|
2020-09-24 03:40:33 -03:00
|
|
|
return translateESCVelocity("PKT_ESC_SETPOINT_8");
|
2019-12-09 00:30:58 -04:00
|
|
|
case PKT_ESC_SETPOINT_9:
|
2020-09-24 03:40:33 -03:00
|
|
|
return translateESCVelocity("PKT_ESC_SETPOINT_9");
|
2019-12-09 00:30:58 -04:00
|
|
|
case PKT_ESC_SETPOINT_10:
|
2020-09-24 03:40:33 -03:00
|
|
|
return translateESCVelocity("PKT_ESC_SETPOINT_10");
|
2019-12-09 00:30:58 -04:00
|
|
|
case PKT_ESC_SETPOINT_11:
|
2020-09-24 03:40:33 -03:00
|
|
|
return translateESCVelocity("PKT_ESC_SETPOINT_11");
|
2019-12-09 00:30:58 -04:00
|
|
|
case PKT_ESC_SETPOINT_12:
|
2020-09-24 03:40:33 -03:00
|
|
|
return translateESCVelocity("PKT_ESC_SETPOINT_12");
|
2019-12-09 00:30:58 -04:00
|
|
|
case PKT_ESC_SETPOINT_13:
|
2020-09-24 03:40:33 -03:00
|
|
|
return translateESCVelocity("PKT_ESC_SETPOINT_13");
|
2019-12-09 00:30:58 -04:00
|
|
|
case PKT_ESC_SETPOINT_14:
|
2020-09-24 03:40:33 -03:00
|
|
|
return translateESCVelocity("PKT_ESC_SETPOINT_14");
|
2019-12-09 00:30:58 -04:00
|
|
|
case PKT_ESC_SETPOINT_15:
|
2020-09-24 03:40:33 -03:00
|
|
|
return translateESCVelocity("PKT_ESC_SETPOINT_15");
|
2019-12-09 00:30:58 -04:00
|
|
|
case PKT_ESC_SETPOINT_16:
|
2020-09-24 03:40:33 -03:00
|
|
|
return translateESCVelocity("PKT_ESC_SETPOINT_16");
|
2019-12-09 00:30:58 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* \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:
|
2020-09-24 03:40:33 -03:00
|
|
|
return translateESCVelocity("PKT_ESC_PWM_CMD");
|
2019-12-09 00:30:58 -04:00
|
|
|
case PKT_ESC_RPM_CMD:
|
2020-09-24 03:40:33 -03:00
|
|
|
return translateESCVelocity("PKT_ESC_RPM_CMD");
|
2019-12-09 00:30:58 -04:00
|
|
|
case PKT_ESC_DISABLE:
|
2020-09-24 03:40:33 -03:00
|
|
|
return translateESCVelocity("PKT_ESC_DISABLE");
|
2019-12-09 00:30:58 -04:00
|
|
|
case PKT_ESC_STANDBY:
|
2020-09-24 03:40:33 -03:00
|
|
|
return translateESCVelocity("PKT_ESC_STANDBY");
|
2019-12-09 00:30:58 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* \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:
|
2020-09-24 03:40:33 -03:00
|
|
|
return translateESCVelocity("PKT_ESC_STATUS_A");
|
2019-12-09 00:30:58 -04:00
|
|
|
case PKT_ESC_STATUS_B:
|
2020-09-24 03:40:33 -03:00
|
|
|
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");
|
2019-12-09 00:30:58 -04:00
|
|
|
case PKT_ESC_ACCELEROMETER:
|
2020-09-24 03:40:33 -03:00
|
|
|
return translateESCVelocity("PKT_ESC_ACCELEROMETER");
|
2019-12-09 00:30:58 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* \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 "";
|
2020-09-24 03:40:33 -03:00
|
|
|
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");
|
2019-12-09 00:30:58 -04:00
|
|
|
case PKT_ESC_SERIAL_NUMBER:
|
2020-09-24 03:40:33 -03:00
|
|
|
return translateESCVelocity("PKT_ESC_SERIAL_NUMBER");
|
2019-12-09 00:30:58 -04:00
|
|
|
case PKT_ESC_TITLE:
|
2020-09-24 03:40:33 -03:00
|
|
|
return translateESCVelocity("PKT_ESC_TITLE");
|
2019-12-09 00:30:58 -04:00
|
|
|
case PKT_ESC_FIRMWARE:
|
2020-09-24 03:40:33 -03:00
|
|
|
return translateESCVelocity("PKT_ESC_FIRMWARE");
|
2019-12-09 00:30:58 -04:00
|
|
|
case PKT_ESC_SYSTEM_INFO:
|
2020-09-24 03:40:33 -03:00
|
|
|
return translateESCVelocity("PKT_ESC_SYSTEM_INFO");
|
2019-12-09 00:30:58 -04:00
|
|
|
case PKT_ESC_TELEMETRY_SETTINGS:
|
2020-09-24 03:40:33 -03:00
|
|
|
return translateESCVelocity("PKT_ESC_TELEMETRY_SETTINGS");
|
2019-12-09 00:30:58 -04:00
|
|
|
case PKT_ESC_EEPROM:
|
2020-09-24 03:40:33 -03:00
|
|
|
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");
|
2019-12-09 00:30:58 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// end of ESCVelocityProtocol.c
|