Added ADC thread that waits for msgq channel bitmask

This commit is contained in:
Your Name
2026-09-24 14:14:18 +03:00
parent dd7e6d9456
commit 4066cd3fbe
6 changed files with 102 additions and 9 deletions
+6 -3
View File
@@ -16,8 +16,10 @@ LED_TOGGLE = 2
LED_SET = 3
SERVO_SET = 4
SERVO_SET_ALL = 5
ADC_READ = 6
ADC_READ_ALL = 7
ADC_READ_RAW = 6
ADC_READ_RAW_ALL = 7
ADC_READ = 8
ADC_READ_ALL = 9
DEVICE_ID = 0
@@ -114,7 +116,8 @@ def main():
threading.Thread(target=reader, args=(ser,), daemon=True).start()
data = bytearray()
data.append(17)
# Data needs to be a bitmask of channels
data.append(0b11011)
ser.write(make_packet(ADC_READ, data))