refactoring: type safety

This commit is contained in:
rusefillc 2022-09-11 11:00:12 -04:00
parent c73a8c2f46
commit 0ff7af9db5
1 changed files with 10 additions and 0 deletions

View File

@ -234,6 +234,16 @@ void TriggerWaveform::addEventAngle(angle_t angle, TriggerWheel const channelInd
addEvent(angle / getCycleDuration(), channelIndex, state); 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) { void TriggerWaveform::addEvent(angle_t angle, TriggerWheel const channelIndex, TriggerValue const state) {
efiAssertVoid(CUSTOM_OMODE_UNDEF, operationMode != OM_NONE, "operationMode not set"); efiAssertVoid(CUSTOM_OMODE_UNDEF, operationMode != OM_NONE, "operationMode not set");