mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-05 07:28:29 -04:00
233 lines
5.8 KiB
C
233 lines
5.8 KiB
C
// ESCVelocityProtocol.c was generated by ProtoGen version 2.18.c
|
|
|
|
/*
|
|
This program 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 program 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/>.
|
|
*/
|
|
|
|
|
|
#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 "ESC_MODE_STANDBY";
|
|
case ESC_MODE_PWM:
|
|
return "ESC_MODE_PWM";
|
|
case ESC_MODE_RPM:
|
|
return "ESC_MODE_RPM";
|
|
case ESC_VALID_MODES:
|
|
return "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 "ESC_COMMAND_SOURCE_NONE";
|
|
case ESC_COMMAND_SOURCE_CAN:
|
|
return "ESC_COMMAND_SOURCE_CAN";
|
|
case ESC_COMMAND_SOURCE_PWM:
|
|
return "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 "ESC_MOTOR_TEMP_SENSOR_OFF";
|
|
case ESC_MOTOR_TEMP_SENSOR_KTY84:
|
|
return "ESC_MOTOR_TEMP_SENSOR_KTY84";
|
|
case ESC_MOTOR_TEMP_SENSOR_KTY83:
|
|
return "ESC_MOTOR_TEMP_SENSOR_KTY83";
|
|
}
|
|
}
|
|
|
|
|
|
/*!
|
|
* \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 "ESC_COMMAND_PRIORITY_CAN_ONLY";
|
|
case ESC_COMMAND_PRIORITY_CAN_PRIORITY:
|
|
return "ESC_COMMAND_PRIORITY_CAN_PRIORITY";
|
|
case ESC_COMMAND_PRIORITY_PWM_PRIORITY:
|
|
return "ESC_COMMAND_PRIORITY_PWM_PRIORITY";
|
|
}
|
|
}
|
|
|
|
|
|
/*!
|
|
* \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 "PKT_ESC_SETPOINT_1";
|
|
case PKT_ESC_SETPOINT_2:
|
|
return "PKT_ESC_SETPOINT_2";
|
|
case PKT_ESC_SETPOINT_3:
|
|
return "PKT_ESC_SETPOINT_3";
|
|
case PKT_ESC_SETPOINT_4:
|
|
return "PKT_ESC_SETPOINT_4";
|
|
case PKT_ESC_SETPOINT_5:
|
|
return "PKT_ESC_SETPOINT_5";
|
|
case PKT_ESC_SETPOINT_6:
|
|
return "PKT_ESC_SETPOINT_6";
|
|
case PKT_ESC_SETPOINT_7:
|
|
return "PKT_ESC_SETPOINT_7";
|
|
case PKT_ESC_SETPOINT_8:
|
|
return "PKT_ESC_SETPOINT_8";
|
|
case PKT_ESC_SETPOINT_9:
|
|
return "PKT_ESC_SETPOINT_9";
|
|
case PKT_ESC_SETPOINT_10:
|
|
return "PKT_ESC_SETPOINT_10";
|
|
case PKT_ESC_SETPOINT_11:
|
|
return "PKT_ESC_SETPOINT_11";
|
|
case PKT_ESC_SETPOINT_12:
|
|
return "PKT_ESC_SETPOINT_12";
|
|
case PKT_ESC_SETPOINT_13:
|
|
return "PKT_ESC_SETPOINT_13";
|
|
case PKT_ESC_SETPOINT_14:
|
|
return "PKT_ESC_SETPOINT_14";
|
|
case PKT_ESC_SETPOINT_15:
|
|
return "PKT_ESC_SETPOINT_15";
|
|
case PKT_ESC_SETPOINT_16:
|
|
return "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 "PKT_ESC_PWM_CMD";
|
|
case PKT_ESC_RPM_CMD:
|
|
return "PKT_ESC_RPM_CMD";
|
|
case PKT_ESC_DISABLE:
|
|
return "PKT_ESC_DISABLE";
|
|
case PKT_ESC_STANDBY:
|
|
return "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 "PKT_ESC_STATUS_A";
|
|
case PKT_ESC_STATUS_B:
|
|
return "PKT_ESC_STATUS_B";
|
|
case PKT_ESC_ACCELEROMETER:
|
|
return "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_SERIAL_NUMBER:
|
|
return "PKT_ESC_SERIAL_NUMBER";
|
|
case PKT_ESC_TITLE:
|
|
return "PKT_ESC_TITLE";
|
|
case PKT_ESC_FIRMWARE:
|
|
return "PKT_ESC_FIRMWARE";
|
|
case PKT_ESC_SYSTEM_INFO:
|
|
return "PKT_ESC_SYSTEM_INFO";
|
|
case PKT_ESC_TELEMETRY_SETTINGS:
|
|
return "PKT_ESC_TELEMETRY_SETTINGS";
|
|
case PKT_ESC_EEPROM:
|
|
return "PKT_ESC_EEPROM";
|
|
}
|
|
}
|
|
|
|
// end of ESCVelocityProtocol.c
|