tooth-event angle cannot be negative

This commit is contained in:
Andrey 2023-10-06 00:16:22 -04:00 committed by rusefillc
parent a6103dca56
commit f4da504968
1 changed files with 2 additions and 0 deletions

View File

@ -46,6 +46,8 @@ bool TriggerScheduler::scheduleOrQueue(const char *msg, AngleBasedEvent *event,
void TriggerScheduler::schedule(const char *msg, AngleBasedEvent* event, action_s action) {
if (event->enginePhase < 0) {
// at the moment we expect API consumer to wrap angle. shall we do the wrapping in the enginePhase setter?
// i.e. what is the best level to take care of the range constraint?
criticalError("Negative angle %s %f", msg, event->enginePhase);
}