def upload(self):
global mbedUploading
if os.path.exists('%s/build/bbc-microbit-classic-gcc/source/microbit-build-combined.hex' % buildLocation):
if os.path.exists(SETTINGS['mbitLocation']):
end = open('%s/build/bbc-microbit-classic-gcc/source/microbit-build-combined.hex' % buildLocation).read()
open(
'%s/microbit-build-combined.hex' % SETTINGS['mbitLocation'],
'w'
).write(end)
else:
gobject.idle_add(self.message, """Cannot upload!
Micro:Bit not found!
Check it is plugged in and
Micro:Pi knows where to find it.""")
else:
gobject.idle_add(self.message, """No build files avaliable""")
mbedUploading = False
评论列表
文章目录