diff --git a/src/spicelib/devices/isrc/isrcload.c b/src/spicelib/devices/isrc/isrcload.c index d88cc4072..67e96e3bf 100644 --- a/src/spicelib/devices/isrc/isrcload.c +++ b/src/spicelib/devices/isrc/isrcload.c @@ -205,18 +205,18 @@ ISRCload(GENmodel *inModel, CKTcircuit *ckt) case SFFM: { - double VO, VA, FM, MDI, FC, TD, PHASEM, PHASEC; + double VO, VA, FC, MDI, FM, TD, PHASEM, PHASEC; double phasec; double phasem; static bool warn1 = FALSE, warn2 = FALSE; VO = here->ISRCcoeffs[0]; VA = here->ISRCcoeffs[1]; - FM = here->ISRCfunctionOrder > 2 + FC = here->ISRCfunctionOrder > 2 ? here->ISRCcoeffs[2] : (5./ckt->CKTfinalTime); MDI = here->ISRCfunctionOrder > 3 ? here->ISRCcoeffs[3] : 90.0; - FC = here->ISRCfunctionOrder > 4 + FM = here->ISRCfunctionOrder > 4 && here->ISRCcoeffs[4] ? here->ISRCcoeffs[4] : (500./ckt->CKTfinalTime); TD = here->ISRCfunctionOrder > 5 diff --git a/src/spicelib/devices/vsrc/vsrcload.c b/src/spicelib/devices/vsrc/vsrcload.c index c4190d25d..3e2f86b8e 100644 --- a/src/spicelib/devices/vsrc/vsrcload.c +++ b/src/spicelib/devices/vsrc/vsrcload.c @@ -233,18 +233,18 @@ VSRCload(GENmodel *inModel, CKTcircuit *ckt) case SFFM: { - double VO, VA, FM, MDI, FC, TD, PHASEM, PHASEC; + double VO, VA, FC, MDI, FM, TD, PHASEM, PHASEC; double phasec; double phasem; static bool warn1 = FALSE, warn2 = FALSE; VO = here->VSRCcoeffs[0]; VA = here->VSRCcoeffs[1]; - FM = here->VSRCfunctionOrder > 2 + FC = here->VSRCfunctionOrder > 2 ? here->VSRCcoeffs[2] : (5./ckt->CKTfinalTime); MDI = here->VSRCfunctionOrder > 3 ? here->VSRCcoeffs[3] : 90.0; /* 0.9 * FC / FM */ - FC = here->VSRCfunctionOrder > 4 + FM = here->VSRCfunctionOrder > 4 && here->VSRCcoeffs[4] /* test if not 0 */ ? here->VSRCcoeffs[4] : (500./ckt->CKTfinalTime); TD = here->VSRCfunctionOrder > 5