X-Git-Url: https://rtime.felk.cvut.cz/gitweb/fpga/rpi-motor-control.git/blobdiff_plain/1cf729421e63f859e426a429f9ce935a86afd167..5d8290ceb4f6810b3bf47d15bcbb0fc63ff4a837:/pmsm-control/test_sw/cmd_proc.c diff --git a/pmsm-control/test_sw/cmd_proc.c b/pmsm-control/test_sw/cmd_proc.c index 8f49e91..bb3be07 100644 --- a/pmsm-control/test_sw/cmd_proc.c +++ b/pmsm-control/test_sw/cmd_proc.c @@ -61,7 +61,7 @@ static void start(struct rpi_state* state){ */ static void stop(struct rpi_state* state){ sem_wait(&state->thd_par_sem); - state->commutate=0; + setCommutationOff(state); state->pos_reg_ena=0; state->spd_reg_ena=0; state->duty=0; @@ -82,7 +82,7 @@ static void dutySet(struct rpi_state* state, int duty){ state->duty=duty; state->pos_reg_ena=0; state->spd_reg_ena=0; - state->commutate=1; + setCommutationOn(state); sem_post(&state->thd_par_sem); } @@ -94,7 +94,7 @@ static void goAbsolute(struct rpi_state* state, int pos){ sem_wait(&state->thd_par_sem); state->spd_reg_ena=0; state->pos_reg_ena=1; - state->commutate=1; + setCommutationOn(state); state->desired_pos=pos; sem_post(&state->thd_par_sem); } @@ -126,7 +126,7 @@ static void setSpeed(struct rpi_state* state, int speed){ sem_wait(&state->thd_par_sem); state->pos_reg_ena=0; state->spd_reg_ena=1; - state->commutate=1; + setCommutationOn(state); state->desired_spd=speed; sem_post(&state->thd_par_sem); }