diff options
| author | Selene ToyKeeper | 2021-11-06 02:30:08 -0600 |
|---|---|---|
| committer | Selene ToyKeeper | 2021-11-06 02:30:08 -0600 |
| commit | 02521ee8094ff79ff5e927856008c4fa153be6eb (patch) | |
| tree | e9eebc593b719a57cbe9fe89c1db6150363e7e03 | |
| parent | greatly smoothed out SP10 ramp, and configured defaults (diff) | |
| download | anduril-02521ee8094ff79ff5e927856008c4fa153be6eb.tar.gz anduril-02521ee8094ff79ff5e927856008c4fa153be6eb.tar.bz2 anduril-02521ee8094ff79ff5e927856008c4fa153be6eb.zip | |
reduced SP10 downward ramp flicker even more
(reduced PWM_TOP minimum timing window to 32 cpu cycles,
to allow TOP value of 64 to work better)
| -rw-r--r-- | spaghetti-monster/fsm-ramping.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spaghetti-monster/fsm-ramping.c b/spaghetti-monster/fsm-ramping.c index 49e173f..abbfbde 100644 --- a/spaghetti-monster/fsm-ramping.c +++ b/spaghetti-monster/fsm-ramping.c @@ -146,8 +146,8 @@ void set_level(uint8_t level) { // the timing of changing the TOP value (section 12.8.4)) // (but don't wait when turning on from zero, because // it'll reset the phase below anyway) - // to be safe, allow at least 64 cycles to update TOP - while(prev_level && (PWM1_CNT > (top - 64))) {} + // to be safe, allow at least 32 cycles to update TOP + while(prev_level && (PWM1_CNT > (top - 32))) {} #endif // pulse frequency modulation, a.k.a. dynamic PWM PWM1_TOP = top; @@ -155,13 +155,13 @@ void set_level(uint8_t level) { // repeat for other channels if necessary #ifdef PMW2_TOP #ifdef PWM2_CNT - while(prev_level && (PWM2_CNT > (top - 64))) {} + while(prev_level && (PWM2_CNT > (top - 32))) {} #endif PWM2_TOP = top; #endif #ifdef PMW3_TOP #ifdef PWM3_CNT - while(prev_level && (PWM3_CNT > (top - 64))) {} + while(prev_level && (PWM3_CNT > (top - 32))) {} #endif PWM3_TOP = top; #endif |
