From 9960416e32f62f75c113ab73d6c086a6e79a0fbc Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Sat, 28 Apr 2018 00:58:16 +0200 Subject: [PATCH] Spice simulator: plot currents in DC sweep simulation Fixes: lp:1767457 * https://bugs.launchpad.net/kicad/+bug/1767457 --- eeschema/dialogs/dialog_signal_list.cpp | 4 +++- eeschema/sim/sim_plot_panel.cpp | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/eeschema/dialogs/dialog_signal_list.cpp b/eeschema/dialogs/dialog_signal_list.cpp index be115c6bc0..a17d805c04 100644 --- a/eeschema/dialogs/dialog_signal_list.cpp +++ b/eeschema/dialogs/dialog_signal_list.cpp @@ -59,7 +59,9 @@ bool DIALOG_SIGNAL_LIST::TransferDataToWindow() } // For some reason, it is not possible to plot currents in any but transient analysis - if( m_exporter->GetSimType() == ST_TRANSIENT ) + auto simType = m_exporter->GetSimType(); + + if( simType == ST_TRANSIENT || simType == ST_DC ) { for( const auto& item : m_exporter->GetSpiceItems() ) { diff --git a/eeschema/sim/sim_plot_panel.cpp b/eeschema/sim/sim_plot_panel.cpp index f66d4e71d5..65c4a40799 100644 --- a/eeschema/sim/sim_plot_panel.cpp +++ b/eeschema/sim/sim_plot_panel.cpp @@ -386,6 +386,7 @@ SIM_PLOT_PANEL::SIM_PLOT_PANEL( SIM_TYPE aType, wxWindow* parent, wxWindowID id, case ST_DC: m_axis_x = new VOLTAGE_SCALE_X( wxT( "Voltage (sweeped)" ), mpALIGN_BOTTOM ); m_axis_y1 = new VOLTAGE_SCALE_Y( wxT( "Voltage (measured)" ), mpALIGN_LEFT ); + m_axis_y2 = new CURRENT_SCALE( wxT( "Current" ), mpALIGN_RIGHT ); break; case ST_NOISE: