mirror of
https://github.com/undera/pylgbst.git
synced 2020-11-18 19:37:26 -08:00
Prepare to conflict
This commit is contained in:
parent
abd502b70c
commit
7bcba47de5
@ -27,10 +27,14 @@ for device in hub.devices:
|
|||||||
|
|
||||||
## Debug Server
|
## Debug Server
|
||||||
|
|
||||||
`sudo python -c "from pylgbst.comms import *; import logging; logging.basicConfig(level=logging.DEBUG); DebugServer(BLEConnection().connect()).start()"`
|
```
|
||||||
|
sudo python -c "from pylgbst.comms import *; import logging; logging.basicConfig(level=logging.DEBUG); DebugServer(BLEConnection().connect()).start()"
|
||||||
|
```
|
||||||
|
|
||||||
## Roadmap
|
## Roadmap
|
||||||
|
|
||||||
|
- make notifications from pygattlib to quickly get into parallel thread, to avoid segfaults
|
||||||
|
- support working with push button
|
||||||
- Give nice documentation examples, don't forget to mention logging
|
- Give nice documentation examples, don't forget to mention logging
|
||||||
- make angled motors to be synchronous by default => 3-state status
|
- make angled motors to be synchronous by default => 3-state status
|
||||||
- make sure unit tests cover all important code
|
- make sure unit tests cover all important code
|
||||||
|
2
demo.py
2
demo.py
@ -168,7 +168,7 @@ if __name__ == '__main__':
|
|||||||
|
|
||||||
hub = MoveHub(connection)
|
hub = MoveHub(connection)
|
||||||
|
|
||||||
demo_motor_sensors(hub)
|
demo_motors_timed(hub)
|
||||||
# demo_all(hub)
|
# demo_all(hub)
|
||||||
|
|
||||||
log.info("Sleeping 60s")
|
log.info("Sleeping 60s")
|
||||||
|
@ -62,9 +62,6 @@ class MoveHub(object):
|
|||||||
return self.connection.read(DEVICE_NAME)
|
return self.connection.read(DEVICE_NAME)
|
||||||
|
|
||||||
def _notify(self, handle, data):
|
def _notify(self, handle, data):
|
||||||
"""
|
|
||||||
Using https://github.com/JorgePe/BOOSTreveng/blob/master/Notifications.md
|
|
||||||
"""
|
|
||||||
orig = data
|
orig = data
|
||||||
|
|
||||||
if handle != MOVE_HUB_HARDWARE_HANDLE:
|
if handle != MOVE_HUB_HARDWARE_HANDLE:
|
||||||
|
@ -30,6 +30,7 @@ class Vernie(MoveHub):
|
|||||||
def _color_distance_data(self, color, distance):
|
def _color_distance_data(self, color, distance):
|
||||||
log.debug("Color & Distance data: %s %s", COLORS[color], distance)
|
log.debug("Color & Distance data: %s %s", COLORS[color], distance)
|
||||||
self._sensor_distance = distance
|
self._sensor_distance = distance
|
||||||
|
if self._color_detected != color:
|
||||||
self._color_detected = color
|
self._color_detected = color
|
||||||
self.led.set_color(self._color_detected if self._color_detected != COLOR_NONE else COLOR_BLACK)
|
self.led.set_color(self._color_detected if self._color_detected != COLOR_NONE else COLOR_BLACK)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user