Skip to content

Commit e6fe329

Browse files
authored
fix incorrect timestamp bug that occurs if you add a note before any other events have occurred (#153)
1 parent a70ba97 commit e6fe329

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

source/communication/pycboard.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,6 @@ def setup_state_machine(self, sm_name, sm_dir=None, uploaded=False):
421421
micropython_version=self.micropython_version,
422422
)
423423
self.data_logger.reset()
424-
self.timestamp = 0
425424

426425
def get_states(self):
427426
"""Return states as a dictionary {state_name: state_ID}"""
@@ -440,7 +439,8 @@ def start_framework(self, data_output=True):
440439
self.gc_collect()
441440
self.exec("fw.data_output = " + repr(data_output))
442441
self.serial.reset_input_buffer()
443-
self.last_message_time = 0
442+
self.last_message_time = time.time()
443+
self.timestamp = 0
444444
self.exec_raw_no_follow("fw.run()")
445445
self.framework_running = True
446446

0 commit comments

Comments
 (0)