Skip to content

Commit d41c91b

Browse files
committed
Merge branch 'esp32-dev' of https://github.com/yoann-darche/micropython into esp32-dev
2 parents 06c9d75 + 5245712 commit d41c91b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

ports/esp32/machine_pwm.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -527,6 +527,11 @@ static void mp_machine_pwm_print(const mp_print_t *print, mp_obj_t self_in, mp_p
527527
mp_printf(print, ", duty_u16=%d", get_duty_u16(self));
528528
}
529529

530+
mp_printf(print, ", duty_raw=%d", get_duty_raw(self));
531+
532+
int resolution = timers[TIMER_IDX(self->mode, self->timer)].duty_resolution;
533+
mp_printf(print, ", resolution=%d", resolution);
534+
530535
int resolution = timers[TIMER_IDX(self->mode, self->timer)].duty_resolution;
531536
mp_printf(print, ", (duty=%.2f%%, resolution=%.3f%%)", 100.0 * get_duty_raw(self) / (1 << resolution), 100.0 * 1 / (1 << resolution)); // percents
532537

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy