Updates
This commit is contained in:
@@ -82,14 +82,9 @@ def trigger_serial_command():
|
||||
# Serial logic
|
||||
print(f"[{time.strftime('%H:%M:%S')}] SENDING SERIAL COMMAND...")
|
||||
|
||||
command = 83 # 0x53 'S' ASCII
|
||||
command = 115 # 0x73 's' ASCII
|
||||
|
||||
b1 = (voltage_mv >> 24) & 0xFF # Most Significant Byte
|
||||
b2 = (voltage_mv >> 16) & 0xFF
|
||||
b3 = (voltage_mv >> 8) & 0xFF
|
||||
b4 = voltage_mv & 0xFF
|
||||
|
||||
data = (command, state, b1, b2, b3, b4)
|
||||
data = (command, state)
|
||||
byte_data = pack_integers_to_bytes(*data)
|
||||
ser.write(serial.to_bytes(byte_data))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user