Merge pull request #11776 from mprse/issue_11769_cypress_pwm_fix

Fix for issue #11769 (Cypress: PWM FPGA test wrong assert)
pull/11791/head
Martin Kojtal 2019-10-31 17:08:06 +01:00 committed by GitHub
commit aba8f42600
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -50,7 +50,7 @@ void pwmout_write(pwmout_t *obj, float percent)
float pwmout_read(pwmout_t *obj) float pwmout_read(pwmout_t *obj)
{ {
return 100.0f * obj->width_us / obj->period_us; return ((float)(obj->width_us) / obj->period_us);
} }
void pwmout_period(pwmout_t *obj, float seconds) void pwmout_period(pwmout_t *obj, float seconds)