mirror of
https://gitlab.com/manzerbredes/esds.git
synced 2025-04-19 03:59:45 +00:00
Debug synchronization + add return code
This commit is contained in:
parent
57f020e09d
commit
cfa677a0c6
21 changed files with 107 additions and 71 deletions
|
@ -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")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue