During debugging for software PWM some jsWarn (in jstimer, function jstPinPWM) have been used.
Looks to me, that 2nd var of same type is always shown as zero.
See attached code, where only sequence of 2 vars is changed:
Result in debug window is:
Or is %d the wrong format ?
My guess in period and pulseLength are uint64 values, not uint32? This is a classic C printf-style problem.
You just need to cast the values to be 32 bit:
Don't worry about formatting, just type in the text and we'll take care of making sense of it. We will auto-convert links, and if you put asterisks around words we will make them bold.
For a full reference visit the Markdown syntax.
© Espruino, powered by microcosm.
Report a problem