listenerNoGui: beep only in case of detected MAC

This commit is contained in:
uhi22 2024-08-07 13:23:21 +02:00
parent ff163dc894
commit ffa02b1f0a

View file

@ -31,7 +31,7 @@ def cbShowStatus(s, selection=""):
def testBlockingBeep(patternselection): def testBlockingBeep(patternselection):
if (patternselection==1): if (patternselection==1):
# The "MAC Found" beep # The "MAC Found" beep
p.ChangeDutyCycle(10) p.ChangeDutyCycle(30)
p.ChangeFrequency(1100) p.ChangeFrequency(1100)
time.sleep(0.3) time.sleep(0.3)
p.ChangeFrequency(1300) p.ChangeFrequency(1300)
@ -82,10 +82,10 @@ def trySomeHttp():
print(len(strGpsPos)) print(len(strGpsPos))
if (len(strGpsPos)>7): if (len(strGpsPos)>7):
print("Valid GPS coordinates, and http logging worked") print("Valid GPS coordinates, and http logging worked")
testBlockingBeep(2) #testBlockingBeep(2)
else: else:
print("http was ok, but no GPS position") print("http was ok, but no GPS position")
testBlockingBeep(3) #testBlockingBeep(3)
except Exception as err: except Exception as err:
contents = "(no contents received) " + str(err) contents = "(no contents received) " + str(err)
print(contents) print(contents)