got some comms working, still stops working when motor runs
This commit is contained in:
@@ -158,7 +158,7 @@ void APPLICATION_StateMachine(void)
|
||||
case MOTORS_ON:
|
||||
applicationStatus.previousstate = applicationStatus.currentstate;
|
||||
//applicationStatus.currentstate ;
|
||||
comms_check();
|
||||
//comms_check();
|
||||
motor_StateMachine(&Motor1);
|
||||
motor_StateMachine(&Motor2);
|
||||
break;
|
||||
@@ -213,15 +213,18 @@ int main(void)
|
||||
while (1) {
|
||||
//if (Motor1.timerflags.adc_readings_ready_tic) {process_currents();}
|
||||
if (Motor1.timerflags.current_loop_tic) {
|
||||
APPLICATION_StateMachine();
|
||||
exec_commutation(&Motor1);
|
||||
exec_commutation(&Motor2);
|
||||
//APPLICATION_StateMachine();
|
||||
//exec_commutation(&Motor1);
|
||||
//exec_commutation(&Motor2);
|
||||
}
|
||||
|
||||
if (Motor1.timerflags.motor_telemetry_flag) {
|
||||
Motor1.timerflags.motor_telemetry_flag = false;
|
||||
update_telemetry();
|
||||
update_setpoints();
|
||||
APPLICATION_StateMachine();
|
||||
exec_commutation(&Motor1);
|
||||
exec_commutation(&Motor2);
|
||||
|
||||
}
|
||||
//if (run_ECAT) {ECAT_STATE_MACHINE();}
|
||||
|
||||
Reference in New Issue
Block a user