p3p / MarlinSimUI

Marlin Simulator UI
Other
9 stars 12 forks source link

Add runtime switching of pin logging, with export to VCD file #8

Closed sjasonsmith closed 2 years ago

sjasonsmith commented 2 years ago

Existing pin-logging code was commented out. I've made this selectable at run-time with the ability to export logs.

Added capabilities

  1. Runtime enable/disable/reset of logging image image

  2. Export of a single pin or all pins matching a regex to VCD file format which can be imported into PulseView. image

Sample after importing pins matching ^X_ into PulseView:

image

Known Issues

  1. Changing logging state or resetting logs while not paused can crash There is nothing protecting access to the logging data structures, so if a pin state is changed while the log is being cleared errors can occur.

  2. The file selection dialog is not very good I reused the file dialog from the file streaming option. It doesn't actually guarantee a ".vcd" file extension, and could use improvement.