RFtoSWE / rogue-code

Automatically exported from code.google.com/p/rogue-code
0 stars 0 forks source link

SoftPWM: Pin number 0 not being accessed correctly #8

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Pin number 0 can not be used by this library.

Line number 158 of SoftPWM.cpp uses case pin<0 and case pin>0 but does not 
account for the case of pin=0.

Original issue reported on code.google.com by denleybi...@gmail.com on 13 Jan 2012 at 8:50

GoogleCodeExporter commented 8 years ago
So, it turns out there are many cases (including the aforementioned) in the 
code of "pin > 0" being used instead of "pin >= 0".

A simple find/replace all with those strings on SoftPWM.cpp fixes it (I did it 
on my copy and can use pin 0 now). Make sure this also changes the 
_softpwm_channels[i].pin > 0 to >= 0 so that the ALL argument includes pin 0 
too.

Original comment by denleybi...@gmail.com on 16 Jan 2012 at 2:40