From 0ff7af9db51fa4335e75f8d4980c03a031a7e4b6 Mon Sep 17 00:00:00 2001 From: rusefillc Date: Sun, 11 Sep 2022 11:00:12 -0400 Subject: [PATCH] refactoring: type safety --- .../controllers/trigger/decoders/trigger_structure.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/firmware/controllers/trigger/decoders/trigger_structure.cpp b/firmware/controllers/trigger/decoders/trigger_structure.cpp index b74b1de449..b1b81bab2a 100644 --- a/firmware/controllers/trigger/decoders/trigger_structure.cpp +++ b/firmware/controllers/trigger/decoders/trigger_structure.cpp @@ -234,6 +234,16 @@ void TriggerWaveform::addEventAngle(angle_t angle, TriggerWheel const channelInd addEvent(angle / getCycleDuration(), channelIndex, state); } +const char *getTrigger_wheel_e(TriggerWheel value){ +switch(value) { +case TriggerWheel::T_PRIMARY: + return "T_PRIMARY"; +case TriggerWheel::T_SECONDARY: + return "T_SECONDARY"; + } + return NULL; +} + void TriggerWaveform::addEvent(angle_t angle, TriggerWheel const channelIndex, TriggerValue const state) { efiAssertVoid(CUSTOM_OMODE_UNDEF, operationMode != OM_NONE, "operationMode not set");