stm32/pbdevice: add delay after power on
HSV mode appears to require at least ms to start giving good values. Just after power on, the brightness value is much higher.
@@ -176,9 +176,11 @@ void pbdevice_set_values(pbdevice_t *pbdev, uint8_t mode, int32_t *values, uint8
wait(pbio_iodev_set_data_end, pbio_iodev_set_data_cancel, iodev);
}
+// FIXME: iodev should take care of this based on device data
void pbdevice_set_power_supply(pbdevice_t *pbdev, bool on) {
if (on) {
pb_assert(pbdrv_motor_set_duty_cycle(pbdev->iodev.port, -10000));
+ mp_hal_delay_ms(1000);
} else {
pb_assert(pbdrv_motor_coast(pbdev->iodev.port));
}
