1
0
mirror of https://github.com/undera/pylgbst.git synced 2020-11-18 19:37:26 -08:00
This commit is contained in:
Andrey Pohilko 2017-09-20 11:04:03 +03:00
parent da0bb5ad05
commit ca9a781c9d
2 changed files with 5 additions and 2 deletions

View File

@ -1,4 +1,4 @@
from pylgbst.peripherals import ColorDistanceSensor# Python library to interact with LEGO Move Hub
# Python library to interact with LEGO Move Hub
Best way to start is to look into [`demo.py`](demo.py) file, and run it.
@ -44,9 +44,13 @@ general subscription modes & granularity info
good practice is to unsubscribe, especially when used with `DebugServer`
### Motors
### Motor Rotation Sensors
### Tilt Sensor
MoveHub's internal tilt sensor is available through filed `tilt_sensor`
### Color & Distance Sensor
Field named `color_distance_sensor` holds instance of `ColorDistanceSensor`, if one is attached to MoveHub. Sensor has number of different modes to subscribe. Only one, very last subscribe mode is in effect, with many subscriber callbacks allowed.

View File

@ -284,7 +284,6 @@ class TiltSensor(Peripheral):
state = data[4]
self._notify_subscribers(state)
elif self._port_subscription_mode == self.MODE_2AXIS_SIMPLE:
# TODO: figure out right interpreting of this
state = data[4]
self._notify_subscribers(state)
elif self._port_subscription_mode == self.MODE_BUMP: