diff --git a/src/xspice/icm/xtradev/pswitch/cfunc.mod b/src/xspice/icm/xtradev/pswitch/cfunc.mod index 50b9e4665..f00a0d8ba 100644 --- a/src/xspice/icm/xtradev/pswitch/cfunc.mod +++ b/src/xspice/icm/xtradev/pswitch/cfunc.mod @@ -231,6 +231,10 @@ void cm_pswitch(ARGS) /* structure holding parms, } pi_pcntl = INPUT(out) / r * (loc->c2 * inmean * inmean - loc->c1); + if(r == r_on) + pi_pcntl = 0; + if(r == r_off) + pi_pcntl = 0; pi_pvout = 1.0 / r; } @@ -246,9 +250,9 @@ void cm_pswitch(ARGS) /* structure holding parms, if(ANALYSIS != MIF_AC) { /* Output DC & Transient Values */ OUTPUT(out) = INPUT(out) / r; -// PARTIAL(out,out) = pi_pvout; -// PARTIAL(out,cntl_in) = pi_pcntl; - cm_analog_auto_partial(); + PARTIAL(out,out) = pi_pvout; + PARTIAL(out,cntl_in) = pi_pcntl; +// cm_analog_auto_partial(); /* Note that the minus signs are required because current is positive flowing INTO rather than OUT OF a component node. */