logo

ch1.pulse_width_percent()的参数,为什么大于100也行?

2018-09-30 17:45
J
_13922269793

ch1.pulse_width_percent()的参数,为什么大于100也行?占空比不是只能在0~100之间吗?pulse_width_percent函数内部对大于100的参数是怎样处理的?

2018-09-30 18:22
I
网红小智智 星瞳科技

大于100,就自动限制为100呗。

ch1.pulse_width_percent(1000)
print(ch1.pulse_width_percent())

输出:100.0