pyr0ball / pyr0piezo

An AVR/ARM based piezoelectric sensor for use in ultra-precise applications
https://docs.pyroballpcbs.com/
Other
71 stars 23 forks source link

Rev.2.x.x Firmware Drops Duty Cycle to 0 #19

Closed pyr0ball closed 5 years ago

pyr0ball commented 5 years ago

Expected behavior: The PWM duty cycle for VComp_Adj and V_Fol_Adj should be at or close to the desired values set in the parameters section

Actual behavior: They both drop to 0 on boot

I expect something with the logic I wrote isn't doing it's job right. Will require review

Svatevit commented 5 years ago

It's "ADJ_COMP + (diffCompL / 4);"

Shouldn't it be more like "ADJ_COMP += (diffCompL / 4);"?

pyr0ball commented 5 years ago

@Svatevit I'll give that a whirl, thanks!

pyr0ball commented 5 years ago

Yep that did it!

I'm far to used to bash operators.