Commit 469d3331 authored by Oleg Nikulin's avatar Oleg Nikulin

Небольшие доработки скрипта

parent 930784b6
......@@ -16,7 +16,7 @@ temperatures = [30, 45, 50]
def temp_input():
global temperatures
while True:
temps = [0, 0, 0]
temps = temperatures
temp_input = input('\033[75G' + 'Enter up to 3 temperature values (CSV): ')
error = False
......@@ -177,7 +177,7 @@ if __name__ == "__main__":
#b'|/dev/sda2|ST340014A|41|C|'
if output == "b''":
print('Hddtemp output is empty, make sure it is running. If not, launch it with #hddtemp -d')
exit()
#exit()
#вычленяем значение температуры:
temp_pos_end = output.find('|C|')
......@@ -195,7 +195,8 @@ if __name__ == "__main__":
regularPollInterval = True
except (OSError, termios.error):
print('Serial port error. Trying to open serial port again...')
if serial_port is not None:
print('Serial port error. Trying to open serial port again...')
serial_port = open_serial(port, baudrate)
if serial_port is not None:
print('Success')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment