diff --git a/devtimer.py b/devtimer.py index 5214741..113d0bf 100755 --- a/devtimer.py +++ b/devtimer.py @@ -98,7 +98,7 @@ while True: if not digitalRead(FOOTSW): # Button push pulls down Thread(name="ReadFootSW", target=read_footsw).start() - sleep(.2) + sleep(.5) def read_footsw(): global RUNNING @@ -163,8 +163,7 @@ # Start measuring temperature - get_temps = Thread(name="Temperatures", target=monitor_temps) - get_temps.start() + get_temps = Thread(name="Temperatures", target=monitor_temps).start() sleep(1) # Wait a bit for the 1st temp measurement to complete # Start monitoring for footswitch presses @@ -192,11 +191,9 @@ # Update the displays on separate threads - update_time = Thread(name="Timer", target=show_elapsed, args=(display_time, elapsed_time)) - update_time.start() + update_time = Thread(name="Timer", target=show_elapsed, args=(display_time, elapsed_time)).start() - update_temp = Thread(name="Temp", target=show_temp, args=(display_temp, current_temp)) - update_temp.start() + update_temp = Thread(name="Temp", target=show_temp, args=(display_temp, current_temp)).start() # For temperatures in-range, look up the compensating factor diff --git a/ds18b20.py b/ds18b20.py index f80cf39..88ff4cb 100755 --- a/ds18b20.py +++ b/ds18b20.py @@ -60,8 +60,7 @@ def monitor_temps(): while True: - update_temp = Thread(name="Update Temp", target=read_probe) - update_temp.start() + update_temp = Thread(name="Update Temp", target=read_probe).start() sleep(1) if DEBUG: