Commit ca045d97 authored by Damien George's avatar Damien George
Browse files

tools: Update pyboard.py to work with latest changes to RTC.

parent 5ea69859
......@@ -89,8 +89,8 @@ class Pyboard:
return self.exec(pyfile)
def get_time(self):
t = str(self.exec('pyb.time()'), encoding='ascii').strip().split()[1].split(':')
return int(t[0]) * 3600 + int(t[1]) * 60 + int(t[2])
t = str(self.eval('pyb.RTC().datetime()'), encoding='ascii')[1:-1].split(', ')
return int(t[4]) * 3600 + int(t[5]) * 60 + int(t[6])
def execfile(filename, device='/dev/ttyACM0'):
pyb = Pyboard(device)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment