Browse Source

swload.c: reinstate the truncation code from swtrunc.c

which was removed in the following commit:

commit 0dae4607a0
Date:   Wed Apr 25 18:28:20 2001 +0000

    Added a patch to csw and sw from Jon Engelbert dealing with negative histeresys
pre-master-46
h_vogt 13 years ago
committed by rlar
parent
commit
89c4c16829
  1. 1
      src/spicelib/devices/sw/swload.c

1
src/spicelib/devices/sw/swload.c

@ -138,6 +138,7 @@ SWload(GENmodel *inModel, CKTcircuit *ckt)
// After analyzing the transient code, it seems that this is not a problem because state updating
// occurs before the convergence loop in transient processing.
*(ckt->CKTstates[0] + here->SWstate) = current_state;
*(ckt->CKTstates[0] + here->SWstate + 1) = v_ctrl;
if ((current_state == REALLY_ON) || (current_state == HYST_ON))
g_now = model->SWonConduct;

Loading…
Cancel
Save