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

@ -136,6 +136,7 @@ called by the orchestrator to execute the code of your node. The api parameter p
#!/usr/bin/env python
import sys, random, time
from esds import RCode
lr=random.Random(6)
@ -152,7 +153,7 @@ called by the orchestrator to execute the code of your node. The api parameter p
# 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")