-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lights fsm working #235
lights fsm working #235
Conversation
uint32_t counter = 1; | ||
pre_loop_init(); | ||
TickType_t xLastWakeTime = xTaskGetTickCount(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason for moving this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was getting an FSM TIMEOUT
until I moved pre_loop_init()
. I feel like maybe pre_loop_init() takes up a long time (inits all pd outputs?) so maybe it is messing up timing which is why it fixed it. But I'm not sure tbh
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lol I guess that's ok. Would be good to know why though
libraries/ms-common/inc/soft_timer.h
Outdated
@@ -27,6 +27,13 @@ typedef void (*SoftTimerCallback)(SoftTimerId id); | |||
// the time has expired. | |||
StatusCode soft_timer_start(uint32_t duration_ms, SoftTimerCallback callback, SoftTimer *timer); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm having multiple functions may confuse people. Perhaps get rid of this one then?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't want to get rid of the original function because its used in a bunch of places and it seems to be working fine for those cases.
switch (light_id_callback) { | ||
case EE_LIGHT_TYPE_SIGNAL_LEFT: | ||
left_signal_state ^= 1; | ||
#ifdef LIGHTS_FSM_DEBUG |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you keeping all these debugs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasn't sure if I should, so I added ifdefs around them, but I can just get rid of them to make it cleaner.
c345af9
to
cbe8b4b
Compare
No description provided.