On 01/05/2026 14:43, Ralph Corderoy wrote:
Or until sensor_test_loops_out is less than zero.
And for all the reader knows, it may start less than zero. :-)
I never thought of that! The var sensor_test_loops_out is calculated
from two other vars, as is sensor_test_time_out:
# Calculate how many times to continue checking if the has passed a Sensor.
sensor_pause_time = 0.05 # Time in seconds for the program to
pause each time round the Sensor test loop.
# Calculate number of loops in out leg.
sensor_test_time_out = 8 # Time in seconds required.
sensor_test_loops_out = (sensor_test_time_out / sensor_pause_time)
print(sensor_test_loops_out)
# Calculate number of loops in back leg.
sensor_test_time_back = 8 # Time in seconds required.
sensor_test_loops_back = (sensor_test_time_back / sensor_pause_time)
print(sensor_test_loops_back)
This is code that dates back to 2022 (the last time it was pushed to
GitLab and originated inn 2019. I can't see any reason why it shouldn't
work, but it's worth a look. There may have been a bug introduced
during the recent Setting0t-Work activities.
I won't get back on site until early next week, but I'll certainly check
this out.
--
Terry Coles
--
Next meeting: Online, Jitsi, Tuesday, 2026-05-05 20:00
Check to whom you are replying
Meetings, mailing list, IRC, ... https://dorset.lug.org.uk
New thread, don't hijack: mailto:[email protected]