reduce ramp latency to 2% every 1ms

This commit is contained in:
embr 2023-05-02 00:04:49 +02:00
parent ff1e83657d
commit d31ef13e96

View file

@ -11,8 +11,8 @@ static int pwm_slice = 0;
uint8_t current_power = 0;
uint8_t target_power = 0;
#define RAMP_PERIOD_MS 100
#define RAMP_STEP 50
#define RAMP_PERIOD_MS 1
#define RAMP_STEP 2
// Timer and callback for ramping power. Jumping ~50% power or more in one go kills the
// chip with electrical ripples, so be a bit gentle about it.