Merge pull request #27 from spueblas/opamp

Correct input pins of the opamp component by swapping them.
This commit is contained in:
Vadim Kusnetsov 2019-06-23 19:34:37 +02:00 committed by GitHub
commit e418b157ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -76,10 +76,10 @@ Element* OpAmp::info(QString& Name, char* &BitmapFile, bool getNewOne)
QString OpAmp::spice_netlist(bool isXyce)
{
QString in_p = Ports.at(0)->Connection->Name;
if (in_p=="gnd") in_p="0";
QString in_m = Ports.at(1)->Connection->Name;
QString in_m = Ports.at(0)->Connection->Name;
if (in_m=="gnd") in_m="0";
QString in_p = Ports.at(1)->Connection->Name;
if (in_p=="gnd") in_p="0";
QString out = Ports.at(2)->Connection->Name;
if (out=="gnd") out="0";