Save wip...
This commit is contained in:
@@ -622,7 +622,7 @@ class Picowatch(object):
|
|||||||
def download(self, filepath: str):
|
def download(self, filepath: str):
|
||||||
filepath = filepath.strip('./').strip('/')
|
filepath = filepath.strip('./').strip('/')
|
||||||
tab = Tab(4, 30, 15, 100)
|
tab = Tab(4, 30, 15, 100)
|
||||||
tab.labels('', 'Filename', 'Checksum', 'Exception')
|
tab.labels('[ ]', 'Filename', 'Checksum', 'Exception')
|
||||||
status, output, exception = self.filesystem.ls(filepath)
|
status, output, exception = self.filesystem.ls(filepath)
|
||||||
|
|
||||||
if status:
|
if status:
|
||||||
@@ -755,7 +755,8 @@ picowatch = False
|
|||||||
try:
|
try:
|
||||||
env = dotenv_values('.picowatch')
|
env = dotenv_values('.picowatch')
|
||||||
picowatch = Picowatch(Pyboard(env["DEVICE"], env["BAUDRATE"]), env["PROJECT_NAME"])
|
picowatch = Picowatch(Pyboard(env["DEVICE"], env["BAUDRATE"]), env["PROJECT_NAME"])
|
||||||
print(f'Connected automatically to device: {env["DEVICE"]} at a baudrate of: {env["BAUDRATE"]}. Listening to project: ./{env["PROJECT_NAME"]}')
|
print(f'Connected automatically to device: {env["DEVICE"]} at a baudrate of: {env["BAUDRATE"]}')
|
||||||
|
print(f'Listening to project: ./{env["PROJECT_NAME"]}')
|
||||||
except:
|
except:
|
||||||
while not picowatch:
|
while not picowatch:
|
||||||
print('-' * 50)
|
print('-' * 50)
|
||||||
@@ -766,10 +767,12 @@ except:
|
|||||||
try:
|
try:
|
||||||
picowatch = Picowatch(Pyboard(device, baudrate), project_name)
|
picowatch = Picowatch(Pyboard(device, baudrate), project_name)
|
||||||
print('-' * 50)
|
print('-' * 50)
|
||||||
print(f'Connected to device: {picowatch} at a baudrate of: {baudrate}. Listening to project: ./{project_name}')
|
print(f'Connected to device: {picowatch} at a baudrate of: {baudrate}')
|
||||||
|
print(f'Listening to project: ./{env["PROJECT_NAME"]}')
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(str(e))
|
print(str(e))
|
||||||
|
|
||||||
|
print('-' * 50)
|
||||||
picowatch.interupt()
|
picowatch.interupt()
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
|
|||||||
Reference in New Issue
Block a user