We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5ea6985 commit ca045d9Copy full SHA for ca045d9
tools/pyboard.py
@@ -89,8 +89,8 @@ def execfile(self, filename):
89
return self.exec(pyfile)
90
91
def get_time(self):
92
- t = str(self.exec('pyb.time()'), encoding='ascii').strip().split()[1].split(':')
93
- 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])
94
95
def execfile(filename, device='/dev/ttyACM0'):
96
pyb = Pyboard(device)
0 commit comments