1
0
mirror of https://github.com/undera/pylgbst.git synced 2020-11-18 19:37:26 -08:00

Update handler signature

This commit is contained in:
Andrey Pokhilko 2019-12-27 22:36:14 +03:00
parent 6a49f5c840
commit c71befdb66
2 changed files with 3 additions and 2 deletions

View File

@ -10,7 +10,8 @@ criterion = min
cur_luminosity = 0 cur_luminosity = 0
def on_change_lum(lumn): def on_change_lum(lumn, unknown):
del unknown
global cur_luminosity global cur_luminosity
cur_luminosity = lumn cur_luminosity = lumn

View File

@ -586,7 +586,7 @@ class VisionSensor(Peripheral):
elif self._port_mode.mode == self.CALIBRATE: elif self._port_mode.mode == self.CALIBRATE:
return [ushort(data, x * 2) for x in range(8)] return [ushort(data, x * 2) for x in range(8)]
else: else:
log.debug("Unhandled data in mode %s: %s", self._port_mode.mode, str2hex(data)) log.debug("Unhandled VisionSensor data in mode %s: %s", self._port_mode.mode, str2hex(data))
return () return ()
def set_color(self, color): def set_color(self, color):