From 4c8324f1669c5ff82fbdf70a8138334347bd72b9 Mon Sep 17 00:00:00 2001 From: Holger Vogt Date: Thu, 19 May 2022 12:04:44 +0200 Subject: [PATCH] VIN 3 0 PULSE (-1 1 2NS 2NS 2NS 50 NS 100 NS) is now standard (missing dc value). So revert the warning message: VIN 3 0 dc 0 PULSE (-1 1 2NS 2NS 2NS 50 NS 100 NS) yields a note message (not a warning) --- src/spicelib/devices/isrc/isrctemp.c | 21 ++++++++++----------- src/spicelib/devices/vsrc/vsrctemp.c | 22 +++++++++++----------- 2 files changed, 21 insertions(+), 22 deletions(-) diff --git a/src/spicelib/devices/isrc/isrctemp.c b/src/spicelib/devices/isrc/isrctemp.c index d0fa55aef..77e5a8145 100644 --- a/src/spicelib/devices/isrc/isrctemp.c +++ b/src/spicelib/devices/isrc/isrctemp.c @@ -35,17 +35,16 @@ ISRCtemp(GENmodel *inModel, CKTcircuit *ckt) if(here->ISRCacGiven && !here->ISRCacPGiven) { here->ISRCacPhase = 0; } - if(!here->ISRCdcGiven) { - /* no DC value - either have a transient value, or none */ - if(here->ISRCfuncTGiven) { - SPfrontEnd->IFerrorf (ERR_WARNING, - "%s: no DC value, transient time 0 value used", - here->ISRCname); - } else { - SPfrontEnd->IFerrorf (ERR_WARNING, - "%s: has no value, DC 0 assumed", - here->ISRCname); - } + if (!here->ISRCdcGiven && !here->ISRCfuncTGiven) { + /* no DC value, no transient value */ + SPfrontEnd->IFerrorf(ERR_INFO, + "%s: has no value, DC 0 assumed", + here->ISRCname); + } + else if (here->ISRCdcGiven && here->ISRCfuncTGiven) { + SPfrontEnd->IFerrorf(ERR_INFO, + "%s: dc value used for op instead of transient time 0 value.", + here->ISRCname); } if(!here->ISRCmGiven) here->ISRCmValue = 1; diff --git a/src/spicelib/devices/vsrc/vsrctemp.c b/src/spicelib/devices/vsrc/vsrctemp.c index d43b1396e..d05ccaaf7 100644 --- a/src/spicelib/devices/vsrc/vsrctemp.c +++ b/src/spicelib/devices/vsrc/vsrctemp.c @@ -41,17 +41,17 @@ VSRCtemp(GENmodel *inModel, CKTcircuit *ckt) if(here->VSRCacGiven && !here->VSRCacPGiven) { here->VSRCacPhase = 0; } - if(!here->VSRCdcGiven) { - /* no DC value - either have a transient value, or none */ - if(here->VSRCfuncTGiven) { - SPfrontEnd->IFerrorf (ERR_WARNING, - "%s: no DC value, transient time 0 value used", - here->VSRCname); - } else { - SPfrontEnd->IFerrorf (ERR_WARNING, - "%s: has no value, DC 0 assumed", - here->VSRCname); - } + if (!here->VSRCdcGiven && !here->VSRCfuncTGiven) { + /* no DC value, no transient value */ + SPfrontEnd->IFerrorf(ERR_INFO, + "%s: has no value, DC 0 assumed", + here->VSRCname); + } + else if (here->VSRCdcGiven && here->VSRCfuncTGiven) { + /* no DC value, no transient value */ + SPfrontEnd->IFerrorf(ERR_INFO, + "%s: dc value used for op instead of transient time 0 value.", + here->VSRCname); } radians = here->VSRCacPhase * M_PI / 180.0; here->VSRCacReal = here->VSRCacMag * cos(radians);