RC_Channel: use @LoggerEnum to give name for three level source enum

This commit is contained in:
Iampete1 2024-12-20 23:10:27 +00:00 committed by Andrew Tridgell
parent f213edb50b
commit 2851aaf76a

View File

@ -314,19 +314,19 @@ public:
HIGH // indicates auxiliary switch is in the high position (pwm >1800) HIGH // indicates auxiliary switch is in the high position (pwm >1800)
}; };
// Trigger structure containing the function, position and pwm (if applicable) // Trigger structure containing the function, position, source and source index
struct AuxFuncTrigger { struct AuxFuncTrigger {
AUX_FUNC func; AUX_FUNC func;
AuxSwitchPos pos; AuxSwitchPos pos;
// @LoggerEnum: AuxFuncTrigger::Source
enum class Source : uint8_t { enum class Source : uint8_t {
INIT, INIT, // Source index is RC channel index
RC, RC, // Source index is RC channel index
BUTTON, BUTTON, // Source index is button index
MAVLINK, MAVLINK, // Source index is MAVLink channel number
MISSION, MISSION, // Source index is mission item index
SCRIPTING, SCRIPTING, // Source index is not used (always 0)
} source; } source;
// Index within source
uint16_t source_index; uint16_t source_index;
}; };