c4ev3 / EV3-API

EV3-API for Programming the LEGO Mindstorms EV3 in C
http://c4ev3.github.io
GNU General Public License v2.0
70 stars 21 forks source link

ev3_sensor.*: Fixed SetSensorMode bug and tested RGB mode with added functions to return each individual value #23

Closed l-yc closed 4 years ago

l-yc commented 5 years ago

Hi there, I found a bug in the SetSensorMode function, i.e. the sensor mode is not written to the device and I fixed it in this commit. In addition, I tested the RGB mode and added a few functions to return the original values ranging from 0 to 1023 for greater precision. I also recompiled the static library.

Please do tell me if there are any improvements I need to make and I will try my best to edit them in.

a3f commented 4 years ago

I think this is superseded by https://github.com/c4ev3/EV3-API/commit/6a7fe639354cca3fd29b388afa9a025fcd753000. If you think otherwise, please tell.