Debug synchronization + add return code

This commit is contained in:
Loic Guegan 2022-09-09 13:16:42 +02:00
parent 57f020e09d
commit cfa677a0c6
21 changed files with 107 additions and 71 deletions

View file

@ -1,6 +1,7 @@
#!/usr/bin/env python
import sys, random, time
from esds import RCode
lr=random.Random(6)
@ -17,7 +18,7 @@ def execute(api):
# Receive until uptime seconds if elapsed
while api.read("clock") < wakeuntil:
code, data=api.receivet("wlan0",wakeuntil-api.read("clock"))
if code == 0:
if code == RCode.SUCCESS:
api.log("Receive "+data)
api.log("Was up for {}s".format(api.read("clock")-wakeat))
endoff=3600*(i+1)-api.read("clock")