MySensors-HW icon indicating copy to clipboard operation
MySensors-HW copied to clipboard

RollerShutter : bug in abs

Open fab33 opened this issue 8 years ago • 0 comments

Little bug in abs implementation for Arduino (but not only Arduino, abs must be banned from embeded devices !) if (abs(oldacsread-acsread)>20) if oldacsread=1 and acsread=2 abs return 65535 ! so the test is ok ! Simple workaround : change type of oldacsread and acsread to int16_t

fab33 avatar Jan 29 '17 20:01 fab33