Skip to content

Commit

Permalink
io: add state fields
Browse files Browse the repository at this point in the history
  • Loading branch information
jaxxzer committed Dec 28, 2019
1 parent cf07047 commit 3511937
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/main/src/io.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

extern "C" {
#include <adc.h>
#include <bridge.h>
#include <comparator.h>
#include <pwm-input.h>
#include <usart.h>
}
Expand Down Expand Up @@ -164,6 +166,11 @@ void io_write_state()
#endif
message.set_throttle(g.throttle);
message.set_commutation_period(TIM_ARR(COMMUTATION_TIMER));
#if defined(FEEDBACK_COMPARATOR)
message.set_flags(comparator_get_output());
message.set_comparator_step(g_comparator_state);
#endif
message.set_bridge_step(g_bridge_comm_step);
message.updateChecksum();
io_write_message(&message);
}

0 comments on commit 3511937

Please sign in to comment.