MainCode/adalm1000_logger.py aktualisiert
This change ensures that:
The plot data buffers are cleared
The plot lines are reset to empty data
The axes are reset to default ranges (0-1)
The canvas is redrawn to show the cleared plot
(Deepseek)
This commit is contained in:
parent
25322bc59d
commit
876fecb466
@ -502,6 +502,17 @@ class BatteryTester:
|
||||
self.dev.channels['A'].mode = pysmu.Mode.HI_Z
|
||||
self.dev.channels['A'].constant(0)
|
||||
|
||||
# Clear plot data
|
||||
self.time_data.clear()
|
||||
self.voltage_data.clear()
|
||||
self.current_data.clear()
|
||||
if hasattr(self, 'line_voltage') and hasattr(self, 'line_current'):
|
||||
self.line_voltage.set_data([], [])
|
||||
self.line_current.set_data([], [])
|
||||
self.ax.set_xlim(0, 1)
|
||||
self.ax2.set_xlim(0, 1)
|
||||
self.canvas.draw()
|
||||
|
||||
self.status_var.set("Test stopped immediately")
|
||||
self.stop_button.config(state=tk.DISABLED)
|
||||
self.start_button.config(state=tk.NORMAL)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user