enesbcs / rpieasy

Easy MultiSensor device based on Raspberry PI
GNU General Public License v3.0
159 stars 33 forks source link

APDS9660 timer bug #10

Closed enesbcs closed 5 years ago

enesbcs commented 5 years ago

In proximity/light mode the timer seems to be activated for checking gestures, and it should not work like that.

enesbcs commented 5 years ago

I think it is now fixed. https://github.com/enesbcs/rpieasy/commit/6e1edd66faf0a01cb91d92812cd8808471d10a09

happytm commented 5 years ago

Thank you for the fix. I tried it and it does not show gesture topic paylod anymore if proximity/light is chosen in plugin.

Is it possible to get gestures results as a whole numbers like 0,10,20,30,40,50 & 60 without decimal point ? I tried to see plugin code but could not figure out. or is it possible to add option to choose decimal in rpieasy GUI on devices page like Dummy sensor plugin ?

happytm commented 5 years ago

I think even dummy sensor plugin's decimal option not working. No matter how many decimals I choose on device plugin for dummy sensor page in values section it shows in logs as number with 1 decimal only. So choosing any decimal option have no effect on how it shows in log. I am trying to get dummy sensor values as whole number without decimal.

enesbcs commented 5 years ago

You've just found a nasty bug in the core plugin.py. In fact values were rounded to the decimals, but display and sending to controllers get a direct float no matter what.. now i am storing the converted strings instead of the floats, this way decimals should be the same everywhere. (i hope it wont trigger other errors) https://github.com/enesbcs/rpieasy/commit/7b5900a82a255c02c69e9e94476ab18e9b81a260

You may have to delete your existing devices from RPIEasy after updating to see the differences.

happytm commented 5 years ago

Thanks again.

I tested it and your update fixed the issue without any adverse effect so far.

enesbcs commented 5 years ago

Thank you for your feedback, issue is closed now.