« Back to State machine state Active

State machine transition ActiveRecalc

Active
Nuevos parámetros en la entrada fuerzan un recálculo de los timers.
1

Actions

  • PWMGen
    Recalculamos los timers de cuanto tiempo debe estar a 0 y cuanto tiempo debe estar a 1.
    Code
    PWMGen_timHigh=(t_timer)((FL_32)PWMGen_period*PWMGen_duty);
    PWMGen_timLow=PWMGen_period-PWMGen_timHigh-PWMGen_offset;
    PWMGen_oldduty=PWMGen_duty;
    PWMGen_oldperiod=PWMGen_period;
    PWMGen_oldoffset=PWMGen_offset;