slow reset
This commit is contained in:
parent
bbb2b3ff17
commit
aeeb4c232a
5
run.py
5
run.py
@ -484,7 +484,8 @@ def get_sensors():
|
||||
if val == 1 and sensors[idx] >= 0: # skip negative values
|
||||
sensors[idx] += 1
|
||||
else:
|
||||
sensors[idx] = 0
|
||||
if sensors[idx] >= 4:
|
||||
sensors[idx] -= 4
|
||||
else:
|
||||
out = [0, 0, 0, 0]
|
||||
|
||||
@ -493,7 +494,7 @@ def get_sensors():
|
||||
for x in range(len(sensors)):
|
||||
if sensors[x] >= 180: # 3 sec
|
||||
# cable newly detected on tray
|
||||
sensors[x] = -1
|
||||
sensors[x] = -10000
|
||||
fprint("Precense detected: slot " + str(x))
|
||||
return x
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user