diode: correct charge reporting for soft recovery option

This commit is contained in:
dwarning 2026-03-25 21:31:48 +01:00 committed by Holger Vogt
parent f227a3abd6
commit 33b53f9df6
1 changed files with 2 additions and 0 deletions

View File

@ -85,6 +85,8 @@ DIOask (CKTcircuit *ckt, GENinstance *inst, int which, IFvalue *value,
return(OK);
case DIO_CHARGE:
value->rValue = *(ckt->CKTstate0+here->DIOcapCharge);
if ((here->DIOqpNode > 0) && (here->DIOtTransitTime!=0))
value->rValue += here->DIOqpGain * *(ckt->CKTstate0 + here->DIOsrcapCharge);
return(OK);
case DIO_CAPCUR:
value->rValue = *(ckt->CKTstate0+here->DIOcapCurrent);