2023-05-21 22:57:51 -03:00
|
|
|
// ESCVelocityProtocol.c was generated by ProtoGen version 3.5.c
|
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/>.
|
|
|
|
*
|
2023-05-21 22:57:51 -03:00
|
|
|
* Author: Oliver Walters / Currawong Engineering Pty Ltd
|
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:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "ESC_MODE_STANDBY";
|
2019-12-09 00:30:58 -04:00
|
|
|
case ESC_MODE_PWM:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "ESC_MODE_PWM";
|
2019-12-09 00:30:58 -04:00
|
|
|
case ESC_MODE_RPM:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "ESC_MODE_RPM";
|
|
|
|
case ESC_MODE_VOLT:
|
|
|
|
return "ESC_MODE_VOLT";
|
2019-12-09 00:30:58 -04:00
|
|
|
case ESC_VALID_MODES:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "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:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "ESC_COMMAND_SOURCE_NONE";
|
2019-12-09 00:30:58 -04:00
|
|
|
case ESC_COMMAND_SOURCE_CAN:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "ESC_COMMAND_SOURCE_CAN";
|
2019-12-09 00:30:58 -04:00
|
|
|
case ESC_COMMAND_SOURCE_PWM:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "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:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "ESC_MOTOR_TEMP_SENSOR_OFF";
|
2019-12-09 00:30:58 -04:00
|
|
|
case ESC_MOTOR_TEMP_SENSOR_KTY84:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "ESC_MOTOR_TEMP_SENSOR_KTY84";
|
2019-12-09 00:30:58 -04:00
|
|
|
case ESC_MOTOR_TEMP_SENSOR_KTY83:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "ESC_MOTOR_TEMP_SENSOR_KTY83";
|
|
|
|
case ESC_MOTOR_TEMP_SENSOR_NTC_SH:
|
|
|
|
return "ESC_MOTOR_TEMP_SENSOR_NTC_SH";
|
|
|
|
case ESC_MOTOR_TEMP_SENSOR_NTC_BETA:
|
|
|
|
return "ESC_MOTOR_TEMP_SENSOR_NTC_BETA";
|
2020-09-24 03:40:33 -03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* \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:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "ESC_MOTOR_DIR_ABC";
|
2020-09-24 03:40:33 -03:00
|
|
|
case ESC_MOTOR_DIR_ACB:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "ESC_MOTOR_DIR_ACB";
|
2020-09-24 03:40:33 -03:00
|
|
|
case ESC_MOTOR_DIR_OTHER:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "ESC_MOTOR_DIR_OTHER";
|
2020-09-24 03:40:33 -03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* \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:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "ESC_HALL_MODE_SENSORLESS";
|
2020-09-24 03:40:33 -03:00
|
|
|
case ESC_HALL_MODE_SENSORED:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "ESC_HALL_MODE_SENSORED";
|
|
|
|
case ESC_HALL_MODE_HYBRID:
|
|
|
|
return "ESC_HALL_MODE_HYBRID";
|
2020-09-24 03:40:33 -03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* \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:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "ESC_AFW_MODE_OFF";
|
2020-09-24 03:40:33 -03:00
|
|
|
case ESC_AFW_MODE_ON:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "ESC_AFW_MODE_ON";
|
2020-09-24 03:40:33 -03:00
|
|
|
case ESC_AFW_MODE_DYNAMIC:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "ESC_AFW_MODE_DYNAMIC";
|
2020-09-24 03:40:33 -03:00
|
|
|
case ESC_AFW_MODE_OTHER:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "ESC_AFW_MODE_OTHER";
|
2020-09-24 03:40:33 -03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* \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:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "ESC_PWM_FREQ_FIXED";
|
2020-09-24 03:40:33 -03:00
|
|
|
case ESC_PWM_FREQ_RAMP:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "ESC_PWM_FREQ_RAMP";
|
2020-09-24 03:40:33 -03:00
|
|
|
case ESC_PWM_FREQ_OTHER:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "ESC_PWM_FREQ_OTHER";
|
2020-09-24 03:40:33 -03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* \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:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "ESC_TIMING_ADVANCE_MODE_FIXED";
|
2020-09-24 03:40:33 -03:00
|
|
|
case ESC_TIMING_ADVANCE_MODE_RAMP:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "ESC_TIMING_ADVANCE_MODE_RAMP";
|
2020-09-24 03:40:33 -03:00
|
|
|
case ESC_TIMING_ADVANCE_MODE_OTHER:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "ESC_TIMING_ADVANCE_MODE_OTHER";
|
2020-09-24 03:40:33 -03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* \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:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "ESC_PROTECTION_WARNING";
|
2020-09-24 03:40:33 -03:00
|
|
|
case ESC_PROTECTION_FOLDBACK:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "ESC_PROTECTION_FOLDBACK";
|
2020-09-24 03:40:33 -03:00
|
|
|
case ESC_PROTECTION_DISABLE:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "ESC_PROTECTION_DISABLE";
|
2020-09-24 03:40:33 -03:00
|
|
|
case ESC_PROTECTION_INVALID:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "ESC_PROTECTION_INVALID";
|
2020-09-24 03:40:33 -03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* \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:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "ESC_BEEP_NONE";
|
2020-09-24 03:40:33 -03:00
|
|
|
case ESC_BEEP_STATUS:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "ESC_BEEP_STATUS";
|
2020-09-24 03:40:33 -03:00
|
|
|
case ESC_BEEP_ERROR:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "ESC_BEEP_ERROR";
|
2020-09-24 03:40:33 -03:00
|
|
|
case ESC_BEEP_ALL:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "ESC_BEEP_ALL";
|
2020-09-24 03:40:33 -03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* \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:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "ESC_STANDBY_CAUSE_CMD";
|
2020-09-24 03:40:33 -03:00
|
|
|
case ESC_STANDBY_CAUSE_INHIBIT:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "ESC_STANDBY_CAUSE_INHIBIT";
|
2020-09-24 03:40:33 -03:00
|
|
|
case ESC_STANDBY_CAUSE_TIMEOUT:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "ESC_STANDBY_CAUSE_TIMEOUT";
|
2020-09-24 03:40:33 -03:00
|
|
|
case ESC_STANDBY_CAUSE_HALL_SENSOR_ERROR:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "ESC_STANDBY_CAUSE_HALL_SENSOR_ERROR";
|
2020-09-24 03:40:33 -03:00
|
|
|
case ESC_STANDBY_CAUSE_INVALID_CMD:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "ESC_STANDBY_CAUSE_INVALID_CMD";
|
2020-09-24 03:40:33 -03:00
|
|
|
case ESC_STANDBY_CAUSE_PWM_ARM:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "ESC_STANDBY_CAUSE_PWM_ARM";
|
2020-09-24 03:40:33 -03:00
|
|
|
case ESC_STANDBY_CAUSE_FAILED_START:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "ESC_STANDBY_CAUSE_FAILED_START";
|
2020-09-24 03:40:33 -03:00
|
|
|
case ESC_STANDBY_CAUSE_MIN_CMD:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "ESC_STANDBY_CAUSE_MIN_CMD";
|
2020-09-24 03:40:33 -03:00
|
|
|
case ESC_STANDBY_CAUSE_FAILED_RESYNC:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "ESC_STANDBY_CAUSE_FAILED_RESYNC";
|
|
|
|
case ESC_STANDBY_CAUSE_UNEXPECTED:
|
|
|
|
return "ESC_STANDBY_CAUSE_UNEXPECTED";
|
2020-09-24 03:40:33 -03:00
|
|
|
case ESC_STANDBY_CAUSE_RESET:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "ESC_STANDBY_CAUSE_RESET";
|
2020-09-24 03:40:33 -03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* \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:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "ESC_DISABLE_CAUSE_NONE";
|
2020-09-24 03:40:33 -03:00
|
|
|
case ESC_DISABLE_CAUSE_CAN_CMD:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "ESC_DISABLE_CAUSE_CAN_CMD";
|
2020-09-24 03:40:33 -03:00
|
|
|
case ESC_DISABLE_CAUSE_PWM_TIMEOUT:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "ESC_DISABLE_CAUSE_PWM_TIMEOUT";
|
2020-09-24 03:40:33 -03:00
|
|
|
case ESC_DISABLE_CAUSE_HARDWARE:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "ESC_DISABLE_CAUSE_HARDWARE";
|
2020-09-24 03:40:33 -03:00
|
|
|
case ESC_DISABLE_CAUSE_OVERCURRENT:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "ESC_DISABLE_CAUSE_OVERCURRENT";
|
2020-09-24 03:40:33 -03:00
|
|
|
case ESC_DISABLE_CAUSE_OVERSPEED:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "ESC_DISABLE_CAUSE_OVERSPEED";
|
2020-09-24 03:40:33 -03:00
|
|
|
case ESC_DISABLE_CAUSE_OVERTEMP:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "ESC_DISABLE_CAUSE_OVERTEMP";
|
2020-09-24 03:40:33 -03:00
|
|
|
case ESC_DISABLE_CAUSE_UNDERVOLTAGE:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "ESC_DISABLE_CAUSE_UNDERVOLTAGE";
|
2020-09-24 03:40:33 -03:00
|
|
|
case ESC_DISABLE_CAUSE_FAILED_START:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "ESC_DISABLE_CAUSE_FAILED_START";
|
2020-09-24 03:40:33 -03:00
|
|
|
case ESC_DISABLE_CAUSE_COMMUTATION_ERROR:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "ESC_DISABLE_CAUSE_COMMUTATION_ERROR";
|
|
|
|
case ESC_DISABLE_CAUSE_PHASE_VOLTAGE:
|
|
|
|
return "ESC_DISABLE_CAUSE_PHASE_VOLTAGE";
|
|
|
|
case ESC_DISABLE_CAUSE_REGEN_CURRENT:
|
|
|
|
return "ESC_DISABLE_CAUSE_REGEN_CURRENT";
|
2020-09-24 03:40:33 -03:00
|
|
|
case ESC_DISABLE_CAUSE_INVALID_STATE:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "ESC_DISABLE_CAUSE_INVALID_STATE";
|
2020-09-24 03:40:33 -03:00
|
|
|
case ESC_DISABLE_CAUSE_RESET:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "ESC_DISABLE_CAUSE_RESET";
|
2020-09-24 03:40:33 -03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* \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:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "ESC_MOTOR_OFF_STANDBY";
|
2020-09-24 03:40:33 -03:00
|
|
|
case ESC_MOTOR_OFF_BEEP:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "ESC_MOTOR_OFF_BEEP";
|
2020-09-24 03:40:33 -03:00
|
|
|
case ESC_MOTOR_OFF_INITIALISE:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "ESC_MOTOR_OFF_INITIALISE";
|
2020-09-24 03:40:33 -03:00
|
|
|
case ESC_MOTOR_OFF_INHIBITED:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "ESC_MOTOR_OFF_INHIBITED";
|
2020-09-24 03:40:33 -03:00
|
|
|
case ESC_MOTOR_OFF_THROTTLE_MIN:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "ESC_MOTOR_OFF_THROTTLE_MIN";
|
2020-09-24 03:40:33 -03:00
|
|
|
case ESC_MOTOR_OFF_NOT_RUNNING:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "ESC_MOTOR_OFF_NOT_RUNNING";
|
2020-09-24 03:40:33 -03:00
|
|
|
case ESC_MOTOR_OFF_FAILED_START:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "ESC_MOTOR_OFF_FAILED_START";
|
2020-09-24 03:40:33 -03:00
|
|
|
case ESC_MOTOR_OFF_INVALID:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "ESC_MOTOR_OFF_INVALID";
|
2020-09-24 03:40:33 -03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* \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:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "ESC_FAILED_START_CAUSE_RESET";
|
2020-09-24 03:40:33 -03:00
|
|
|
case ESC_FAILED_START_CAUSE_TIMEOUT:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "ESC_FAILED_START_CAUSE_TIMEOUT";
|
2020-09-24 03:40:33 -03:00
|
|
|
case ESC_FAILED_START_CAUSE_OVERSPEED:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "ESC_FAILED_START_CAUSE_OVERSPEED";
|
2020-09-24 03:40:33 -03:00
|
|
|
case ESC_FAILED_START_CAUSE_OVERCURRENT:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "ESC_FAILED_START_CAUSE_OVERCURRENT";
|
2020-09-24 03:40:33 -03:00
|
|
|
case ESC_FAILED_START_CAUSE_SPIN_REVERSED:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "ESC_FAILED_START_CAUSE_SPIN_REVERSED";
|
2020-09-24 03:40:33 -03:00
|
|
|
case ESC_FAILED_START_CAUSE_SPIN_TOO_FAST:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "ESC_FAILED_START_CAUSE_SPIN_TOO_FAST";
|
2020-09-24 03:40:33 -03:00
|
|
|
case ESC_FAILED_START_CAUSE_INVALID:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "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:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "PKT_ESC_SETPOINT_1";
|
2019-12-09 00:30:58 -04:00
|
|
|
case PKT_ESC_SETPOINT_2:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "PKT_ESC_SETPOINT_2";
|
2019-12-09 00:30:58 -04:00
|
|
|
case PKT_ESC_SETPOINT_3:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "PKT_ESC_SETPOINT_3";
|
2019-12-09 00:30:58 -04:00
|
|
|
case PKT_ESC_SETPOINT_4:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "PKT_ESC_SETPOINT_4";
|
2019-12-09 00:30:58 -04:00
|
|
|
case PKT_ESC_SETPOINT_5:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "PKT_ESC_SETPOINT_5";
|
2019-12-09 00:30:58 -04:00
|
|
|
case PKT_ESC_SETPOINT_6:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "PKT_ESC_SETPOINT_6";
|
2019-12-09 00:30:58 -04:00
|
|
|
case PKT_ESC_SETPOINT_7:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "PKT_ESC_SETPOINT_7";
|
2019-12-09 00:30:58 -04:00
|
|
|
case PKT_ESC_SETPOINT_8:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "PKT_ESC_SETPOINT_8";
|
2019-12-09 00:30:58 -04:00
|
|
|
case PKT_ESC_SETPOINT_9:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "PKT_ESC_SETPOINT_9";
|
2019-12-09 00:30:58 -04:00
|
|
|
case PKT_ESC_SETPOINT_10:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "PKT_ESC_SETPOINT_10";
|
2019-12-09 00:30:58 -04:00
|
|
|
case PKT_ESC_SETPOINT_11:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "PKT_ESC_SETPOINT_11";
|
2019-12-09 00:30:58 -04:00
|
|
|
case PKT_ESC_SETPOINT_12:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "PKT_ESC_SETPOINT_12";
|
2019-12-09 00:30:58 -04:00
|
|
|
case PKT_ESC_SETPOINT_13:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "PKT_ESC_SETPOINT_13";
|
2019-12-09 00:30:58 -04:00
|
|
|
case PKT_ESC_SETPOINT_14:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "PKT_ESC_SETPOINT_14";
|
2019-12-09 00:30:58 -04:00
|
|
|
case PKT_ESC_SETPOINT_15:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "PKT_ESC_SETPOINT_15";
|
2019-12-09 00:30:58 -04:00
|
|
|
case PKT_ESC_SETPOINT_16:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "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:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "PKT_ESC_PWM_CMD";
|
2019-12-09 00:30:58 -04:00
|
|
|
case PKT_ESC_RPM_CMD:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "PKT_ESC_RPM_CMD";
|
|
|
|
case PKT_ESC_VOLT_CMD:
|
|
|
|
return "PKT_ESC_VOLT_CMD";
|
2019-12-09 00:30:58 -04:00
|
|
|
case PKT_ESC_DISABLE:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "PKT_ESC_DISABLE";
|
2019-12-09 00:30:58 -04:00
|
|
|
case PKT_ESC_STANDBY:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "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:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "PKT_ESC_STATUS_A";
|
2019-12-09 00:30:58 -04:00
|
|
|
case PKT_ESC_STATUS_B:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "PKT_ESC_STATUS_B";
|
2020-09-24 03:40:33 -03:00
|
|
|
case PKT_ESC_STATUS_C:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "PKT_ESC_STATUS_C";
|
2020-09-24 03:40:33 -03:00
|
|
|
case PKT_ESC_STATUS_D:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "PKT_ESC_STATUS_D";
|
2019-12-09 00:30:58 -04:00
|
|
|
case PKT_ESC_ACCELEROMETER:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "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:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "PKT_ESC_SYSTEM_CMD";
|
2020-09-24 03:40:33 -03:00
|
|
|
case PKT_ESC_SET_TITLE:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "PKT_ESC_SET_TITLE";
|
2020-09-24 03:40:33 -03:00
|
|
|
case PKT_ESC_CONTROL_LOOP_DATA:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "PKT_ESC_CONTROL_LOOP_DATA";
|
|
|
|
case PKT_ESC_HALL_SENSOR_INFO:
|
|
|
|
return "PKT_ESC_HALL_SENSOR_INFO";
|
2020-09-24 03:40:33 -03:00
|
|
|
case PKT_ESC_WARNINGS_ERRORS:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "PKT_ESC_WARNINGS_ERRORS";
|
2020-09-24 03:40:33 -03:00
|
|
|
case PKT_ESC_MOTOR_FLAGS:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "PKT_ESC_MOTOR_FLAGS";
|
2020-09-24 03:40:33 -03:00
|
|
|
case PKT_ESC_EVENT:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "PKT_ESC_EVENT";
|
2019-12-09 00:30:58 -04:00
|
|
|
case PKT_ESC_SERIAL_NUMBER:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "PKT_ESC_SERIAL_NUMBER";
|
2019-12-09 00:30:58 -04:00
|
|
|
case PKT_ESC_TITLE:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "PKT_ESC_TITLE";
|
2019-12-09 00:30:58 -04:00
|
|
|
case PKT_ESC_FIRMWARE:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "PKT_ESC_FIRMWARE";
|
2019-12-09 00:30:58 -04:00
|
|
|
case PKT_ESC_SYSTEM_INFO:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "PKT_ESC_SYSTEM_INFO";
|
2019-12-09 00:30:58 -04:00
|
|
|
case PKT_ESC_TELEMETRY_SETTINGS:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "PKT_ESC_TELEMETRY_SETTINGS";
|
2019-12-09 00:30:58 -04:00
|
|
|
case PKT_ESC_EEPROM:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "PKT_ESC_EEPROM";
|
2020-09-24 03:40:33 -03:00
|
|
|
case PKT_ESC_EXTRA:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "PKT_ESC_EXTRA";
|
|
|
|
case PKT_ESC_MOTOR_TEMP_SENSOR:
|
|
|
|
return "PKT_ESC_MOTOR_TEMP_SENSOR";
|
2020-09-24 03:40:33 -03:00
|
|
|
case PKT_ESC_COMMISSIONING:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "PKT_ESC_COMMISSIONING";
|
2020-09-24 03:40:33 -03:00
|
|
|
case PKT_ESC_TELLTALES:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "PKT_ESC_TELLTALES";
|
2020-09-24 03:40:33 -03:00
|
|
|
case PKT_ESC_GIT_HASH:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "PKT_ESC_GIT_HASH";
|
2020-09-24 03:40:33 -03:00
|
|
|
case PKT_ESC_LEGACY_MOTOR_STATUS:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "PKT_ESC_LEGACY_MOTOR_STATUS";
|
2020-09-24 03:40:33 -03:00
|
|
|
case PKT_ESC_LEGACY_MOTOR_SETTINGS:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "PKT_ESC_LEGACY_MOTOR_SETTINGS";
|
2020-09-24 03:40:33 -03:00
|
|
|
case PKT_ESC_LEGACY_MOTOR_SETTINGS_2:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "PKT_ESC_LEGACY_MOTOR_SETTINGS_2";
|
2020-09-24 03:40:33 -03:00
|
|
|
case PKT_ESC_LEGACY_MOTOR_FIRMWARE:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "PKT_ESC_LEGACY_MOTOR_FIRMWARE";
|
2020-09-24 03:40:33 -03:00
|
|
|
case PKT_ESC_MOTOR_SETTINGS:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "PKT_ESC_MOTOR_SETTINGS";
|
2020-09-24 03:40:33 -03:00
|
|
|
case PKT_ESC_MOTOR_STARTING:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "PKT_ESC_MOTOR_STARTING";
|
2020-09-24 03:40:33 -03:00
|
|
|
case PKT_ESC_MOTOR_PARAMETERS:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "PKT_ESC_MOTOR_PARAMETERS";
|
|
|
|
case PKT_ESC_MOTOR_HALL_CONFIG:
|
|
|
|
return "PKT_ESC_MOTOR_HALL_CONFIG";
|
2020-09-24 03:40:33 -03:00
|
|
|
case PKT_ESC_CONFIG:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "PKT_ESC_CONFIG";
|
2020-09-24 03:40:33 -03:00
|
|
|
case PKT_ESC_WARNINGS:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "PKT_ESC_WARNINGS";
|
2020-09-24 03:40:33 -03:00
|
|
|
case PKT_ESC_PROTECTION_LEVELS:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "PKT_ESC_PROTECTION_LEVELS";
|
2020-09-24 03:40:33 -03:00
|
|
|
case PKT_ESC_PROTECTION_ACTIONS:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "PKT_ESC_PROTECTION_ACTIONS";
|
|
|
|
case PKT_ESC_VOLT_LOOP_SETTINGS:
|
|
|
|
return "PKT_ESC_VOLT_LOOP_SETTINGS";
|
2020-09-24 03:40:33 -03:00
|
|
|
case PKT_ESC_RPM_LOOP_SETTINGS:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "PKT_ESC_RPM_LOOP_SETTINGS";
|
2020-09-24 03:40:33 -03:00
|
|
|
case PKT_ESC_STARTING_SETTINGS:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "PKT_ESC_STARTING_SETTINGS";
|
2020-09-24 03:40:33 -03:00
|
|
|
case PKT_ESC_CURRENT_CALIBRATION:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "PKT_ESC_CURRENT_CALIBRATION";
|
2020-09-24 03:40:33 -03:00
|
|
|
case PKT_ESC_IO_TABLE_SETTINGS:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "PKT_ESC_IO_TABLE_SETTINGS";
|
2020-09-24 03:40:33 -03:00
|
|
|
case PKT_ESC_IO_TABLE_ELEMENT:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "PKT_ESC_IO_TABLE_ELEMENT";
|
2020-09-24 03:40:33 -03:00
|
|
|
case PKT_ESC_THROTTLE_CURVE:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "PKT_ESC_THROTTLE_CURVE";
|
2020-09-24 03:40:33 -03:00
|
|
|
case PKT_ESC_PWM_INPUT_CALIBRATION:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "PKT_ESC_PWM_INPUT_CALIBRATION";
|
2020-09-24 03:40:33 -03:00
|
|
|
case PKT_ESC_BULK_TRANSFER:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "PKT_ESC_BULK_TRANSFER";
|
|
|
|
case PKT_ESC_DRONECAN_SETTINGS:
|
|
|
|
return "PKT_ESC_DRONECAN_SETTINGS";
|
2020-09-24 03:40:33 -03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* \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:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "CMD_ESC_SET_NODE_ID";
|
2020-09-24 03:40:33 -03:00
|
|
|
case CMD_ESC_SET_USER_ID_A:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "CMD_ESC_SET_USER_ID_A";
|
2020-09-24 03:40:33 -03:00
|
|
|
case CMD_ESC_SET_USER_ID_B:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "CMD_ESC_SET_USER_ID_B";
|
2020-09-24 03:40:33 -03:00
|
|
|
case CMD_ESC_TARE_CURRENT:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "CMD_ESC_TARE_CURRENT";
|
2020-09-24 03:40:33 -03:00
|
|
|
case CMD_ESC_IDENTIFY:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "CMD_ESC_IDENTIFY";
|
|
|
|
case CMD_ESC_SET_MOTOR_DIRECTION:
|
|
|
|
return "CMD_ESC_SET_MOTOR_DIRECTION";
|
2020-09-24 03:40:33 -03:00
|
|
|
case CMD_ESC_REQUEST_HF_DATA:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "CMD_ESC_REQUEST_HF_DATA";
|
2020-09-24 03:40:33 -03:00
|
|
|
case CMD_ESC_CONFIGURE_IO_MAP:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "CMD_ESC_CONFIGURE_IO_MAP";
|
2020-09-24 03:40:33 -03:00
|
|
|
case CMD_ESC_CONFIGURE_IO_ELEMENT:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "CMD_ESC_CONFIGURE_IO_ELEMENT";
|
2020-09-24 03:40:33 -03:00
|
|
|
case CMD_ESC_RESET_SETTINGS:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "CMD_ESC_RESET_SETTINGS";
|
2020-09-24 03:40:33 -03:00
|
|
|
case CMD_ESC_ENTER_DEBUG:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "CMD_ESC_ENTER_DEBUG";
|
2020-09-24 03:40:33 -03:00
|
|
|
case CMD_ESC_EXIT_DEBUG:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "CMD_ESC_EXIT_DEBUG";
|
2020-09-24 03:40:33 -03:00
|
|
|
case CMD_ESC_UNLOCK_SETTINGS:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "CMD_ESC_UNLOCK_SETTINGS";
|
2020-09-24 03:40:33 -03:00
|
|
|
case CMD_ESC_LOCK_SETTINGS:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "CMD_ESC_LOCK_SETTINGS";
|
2020-09-24 03:40:33 -03:00
|
|
|
case CMD_ESC_VALIDATE_SETTINGS:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "CMD_ESC_VALIDATE_SETTINGS";
|
2020-09-24 03:40:33 -03:00
|
|
|
case CMD_ESC_RESET_MOTOR_RUN_TIME:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "CMD_ESC_RESET_MOTOR_RUN_TIME";
|
2020-09-24 03:40:33 -03:00
|
|
|
case CMD_ESC_ENTER_BOOTLOADER:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "CMD_ESC_ENTER_BOOTLOADER";
|
2020-09-24 03:40:33 -03:00
|
|
|
case CMD_ESC_RESET:
|
2023-05-21 22:57:51 -03:00
|
|
|
return "CMD_ESC_RESET";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* \brief Lookup label for 'CANProtocols' enum entry
|
|
|
|
*
|
|
|
|
* \param value is the integer value of the enum entry
|
|
|
|
* \return string label of the given entry
|
|
|
|
*/
|
|
|
|
const char* CANProtocols_EnumLabel(int value)
|
|
|
|
{
|
|
|
|
switch (value)
|
|
|
|
{
|
|
|
|
default:
|
|
|
|
return "";
|
|
|
|
case CAN_PROTOCOL_PICCOLO:
|
|
|
|
return "CAN_PROTOCOL_PICCOLO";
|
|
|
|
case CAN_PROTOCOL_DRONECAN:
|
|
|
|
return "CAN_PROTOCOL_DRONECAN";
|
|
|
|
case CAN_PROTOCOL_NONE:
|
|
|
|
return "CAN_PROTOCOL_NONE";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* \brief Lookup label for 'CANBaudRates' enum entry
|
|
|
|
*
|
|
|
|
* \param value is the integer value of the enum entry
|
|
|
|
* \return string label of the given entry
|
|
|
|
*/
|
|
|
|
const char* CANBaudRates_EnumLabel(int value)
|
|
|
|
{
|
|
|
|
switch (value)
|
|
|
|
{
|
|
|
|
default:
|
|
|
|
return "";
|
|
|
|
case CAN_BAUD_RATES_INVALID:
|
|
|
|
return "CAN_BAUD_RATES_INVALID";
|
|
|
|
case CAN_BAUD_RATES_1000K:
|
|
|
|
return "CAN_BAUD_RATES_1000K";
|
|
|
|
case CAN_BAUD_RATES_500K:
|
|
|
|
return "CAN_BAUD_RATES_500K";
|
|
|
|
case CAN_BAUD_RATES_250K:
|
|
|
|
return "CAN_BAUD_RATES_250K";
|
|
|
|
case CAN_BAUD_RATES_125K:
|
|
|
|
return "CAN_BAUD_RATES_125K";
|
|
|
|
case CAN_BAUD_RATES_100K:
|
|
|
|
return "CAN_BAUD_RATES_100K";
|
|
|
|
case CAN_BAUD_RATES_50K:
|
|
|
|
return "CAN_BAUD_RATES_50K";
|
2019-12-09 00:30:58 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// end of ESCVelocityProtocol.c
|