Add dim command

This commit is contained in:
Nick O'Leary
2016-03-04 22:23:43 +00:00
parent f4971aff69
commit 9301ab6c97
5 changed files with 22 additions and 3 deletions

View File

@@ -21,6 +21,7 @@
# F[H|V] - flip horizontal|vertical
# X[0|1] - high frequency reporting (accel/gyro/orientation/compass) off|on
# Y[0|1] - low frequency reporting (temperature/humidity/pressure) off|on
# D[0|1] - Set light level low|high
#
# Outputs:
# Xaccel.x,y,z,gyro.x,y,z,orientation.roll,pitch,yaw,compass
@@ -126,6 +127,11 @@ def process_command(data):
lf_enabled = False
else:
lf_enabled = True
elif data[0] == "D":
if data[1] == '0':
SH.low_light = True
else:
SH.low_light = False
else:
if threading.activeCount() == 2:
scroll.interrupt()