summaryrefslogtreecommitdiffstats
path: root/src/electronics
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-18 18:13:30 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-18 18:13:30 -0600
commitabb8cd68f820cfe0c96965136890a6bdd1093db5 (patch)
tree0ccc113047cebed06b5bd61adeadab4330b7d4a0 /src/electronics
parentc1ef065782051db96cdfd32cf55be6408c2a9d22 (diff)
downloadktechlab-abb8cd68f820cfe0c96965136890a6bdd1093db5.tar.gz
ktechlab-abb8cd68f820cfe0c96965136890a6bdd1093db5.zip
Rename old tq methods that no longer need a unique name
Diffstat (limited to 'src/electronics')
-rw-r--r--src/electronics/components/ecpotentiometer.cpp2
-rw-r--r--src/electronics/components/parallelportcomponent.cpp12
-rw-r--r--src/electronics/components/parallelportcomponent.h2
-rw-r--r--src/electronics/components/piccomponent.cpp4
-rw-r--r--src/electronics/ecnode.cpp2
-rw-r--r--src/electronics/gpsimprocessor.cpp26
-rw-r--r--src/electronics/gpsimprocessor.h16
-rw-r--r--src/electronics/port.cpp4
-rw-r--r--src/electronics/port.h4
-rw-r--r--src/electronics/simulation/capacitance.cpp6
-rw-r--r--src/electronics/simulation/capacitance.h2
-rw-r--r--src/electronics/simulation/element.cpp8
-rw-r--r--src/electronics/simulation/element.h2
-rw-r--r--src/electronics/simulation/inductance.cpp6
-rw-r--r--src/electronics/simulation/inductance.h2
-rw-r--r--src/electronics/simulation/reactive.cpp6
-rw-r--r--src/electronics/simulation/reactive.h2
17 files changed, 53 insertions, 53 deletions
diff --git a/src/electronics/components/ecpotentiometer.cpp b/src/electronics/components/ecpotentiometer.cpp
index 8f55ff5..e989c7c 100644
--- a/src/electronics/components/ecpotentiometer.cpp
+++ b/src/electronics/components/ecpotentiometer.cpp
@@ -98,7 +98,7 @@ void ECPotentiometer::drawShape( TQPainter &p )
pa[1] = TQPoint( 4, -3 );
pa[2] = TQPoint( 4, 3 );
- int space = m_pSlider->tqstyle().tqpixelMetric( TQStyle::PM_SliderSpaceAvailable, m_pSlider );
+ int space = m_pSlider->tqstyle().pixelMetric( TQStyle::PM_SliderSpaceAvailable, m_pSlider );
int base_y = _y + (( angleDegrees() == 0 || angleDegrees() == 270 ) ? 1 : -1) * int( space * m_sliderProp );
pa.translate( _x+16, base_y );
diff --git a/src/electronics/components/parallelportcomponent.cpp b/src/electronics/components/parallelportcomponent.cpp
index 7a2ac55..22f1584 100644
--- a/src/electronics/components/parallelportcomponent.cpp
+++ b/src/electronics/components/parallelportcomponent.cpp
@@ -99,20 +99,20 @@ ParallelPortComponent::ParallelPortComponent( ICNDocument *icnDocument, bool new
//END Data register
- //BEGIN tqStatus register
+ //BEGIN Status register
TQString statusNames[] = { "ERR", "ON", "PE", "ACK", "BUSY" };
// The statusIDs are referenced in the save file and must not change
TQString statusIDs[] = { "ERROR", "ONLINE", "PE", "ACK", "BUSY" };
- // Bits 0...2 in the tqStatus register are not used
+ // Bits 0...2 in the Status register are not used
for ( int i = 3; i < 8; ++i )
{
TQString id = statusIDs[i-3];
TQString name = statusNames[i-3];
// Bit 3 (pin 15) doesn't not follow the same positioning pattern as
- // the other pins in the tqStatus register.
+ // the other pins in the Status register.
if ( i == 3 )
{
pin = createPin( 40, -72, 180, id );
@@ -126,7 +126,7 @@ ParallelPortComponent::ParallelPortComponent( ICNDocument *icnDocument, bool new
m_pLogic[i+8] = createLogicOut( pin, false );
}
- //END tqStatus register
+ //END Status register
//BEGIN Control register
@@ -228,8 +228,8 @@ void ParallelPortComponent::controlCallback( bool )
void ParallelPortComponent::stepNonLogic()
{
- uchar status = m_pParallelPort->readFromRegister( ParallelPort::tqStatus );
- // Bits 0...2 in the tqStatus register are not used
+ uchar status = m_pParallelPort->readFromRegister( ParallelPort::Status );
+ // Bits 0...2 in the Status register are not used
for ( int i = 3; i < 8; ++i )
m_pLogic[i + 8]->setHigh( status | (1 << i) );
}
diff --git a/src/electronics/components/parallelportcomponent.h b/src/electronics/components/parallelportcomponent.h
index eebc12b..bffd85d 100644
--- a/src/electronics/components/parallelportcomponent.h
+++ b/src/electronics/components/parallelportcomponent.h
@@ -40,7 +40,7 @@ class ParallelPortComponent : public CallbackClass, public Component
void dataCallback( bool );
void controlCallback( bool );
- /// Registers: { Data[0...7], tqStatus[0...5], 0[6...7], Control[0...4], 0[5...7] }
+ /// Registers: { Data[0...7], Status[0...5], 0[6...7], Control[0...4], 0[5...7] }
LogicOut * m_pLogic[24];
ParallelPort * m_pParallelPort;
diff --git a/src/electronics/components/piccomponent.cpp b/src/electronics/components/piccomponent.cpp
index 3741182..b1d39bc 100644
--- a/src/electronics/components/piccomponent.cpp
+++ b/src/electronics/components/piccomponent.cpp
@@ -375,7 +375,7 @@ void PICComponent::slotCODCreationSucceeded()
delete m_pGpsim;
m_pGpsim = new GpsimProcessor(m_symbolFile);
- if ( m_pGpsim->codLoadtqStatus() == GpsimProcessor::CodSuccess )
+ if ( m_pGpsim->codLoadStatus() == GpsimProcessor::CodSuccess )
{
MicroInfo * microInfo = m_pGpsim->microInfo();
property("lastPackage")->setValue( microInfo->id() );
@@ -387,7 +387,7 @@ void PICComponent::slotCODCreationSucceeded()
else
{
- m_pGpsim->displayCodLoadtqStatus();
+ m_pGpsim->displayCodLoadStatus();
delete m_pGpsim;
m_pGpsim = 0l;
}
diff --git a/src/electronics/ecnode.cpp b/src/electronics/ecnode.cpp
index 385b98e..77633a2 100644
--- a/src/electronics/ecnode.cpp
+++ b/src/electronics/ecnode.cpp
@@ -175,7 +175,7 @@ void ECNode::drawShape( TQPainter &p )
{
bool drawDivPoint;
TQPoint divPoint = findConnectorDivergePoint(&drawDivPoint);
- m_pinPoint->tqsetVisible(drawDivPoint);
+ m_pinPoint->setVisible(drawDivPoint);
m_pinPoint->move( divPoint.x()-1, divPoint.y()-1 );
}
diff --git a/src/electronics/gpsimprocessor.cpp b/src/electronics/gpsimprocessor.cpp
index 8ad853c..8e2ccfa 100644
--- a/src/electronics/gpsimprocessor.cpp
+++ b/src/electronics/gpsimprocessor.cpp
@@ -89,7 +89,7 @@ GpsimProcessor::GpsimProcessor( TQString symbolFile, TQObject *parent )
m_bCanExecuteNextCycle = true;
m_bIsRunning = false;
m_pPicProcessor = 0l;
- m_codLoadtqStatus = CodUnknown;
+ m_codLoadStatus = CodUnknown;
m_pRegisterMemory = 0l;
m_debugMode = GpsimDebugger::AsmDebugger;
m_pDebugger[0] = m_pDebugger[1] = 0l;
@@ -101,37 +101,37 @@ GpsimProcessor::GpsimProcessor( TQString symbolFile, TQObject *parent )
switch ( (cod_errors)load_symbol_file( &tempProcessor, fileName ) )
{
case COD_SUCCESS:
- m_codLoadtqStatus = CodSuccess;
+ m_codLoadStatus = CodSuccess;
break;
case COD_FILE_NOT_FOUND:
- m_codLoadtqStatus = CodFileNotFound;
+ m_codLoadStatus = CodFileNotFound;
break;
case COD_UNRECOGNIZED_PROCESSOR:
- m_codLoadtqStatus = CodUnrecognizedProcessor;
+ m_codLoadStatus = CodUnrecognizedProcessor;
break;
case COD_FILE_NAME_TOO_LONG:
- m_codLoadtqStatus = CodFileNameTooLong;
+ m_codLoadStatus = CodFileNameTooLong;
break;
case COD_LST_NOT_FOUND:
- m_codLoadtqStatus = CodLstNotFound;
+ m_codLoadStatus = CodLstNotFound;
break;
case COD_BAD_FILE:
- m_codLoadtqStatus = CodBadFile;
+ m_codLoadStatus = CodBadFile;
break;
default:
- m_codLoadtqStatus = CodUnknown;
+ m_codLoadStatus = CodUnknown;
}
#else // GPSIM_0_21_11+
FILE * pFile = fopen( fileName, "r" );
if ( !pFile )
- m_codLoadtqStatus = CodFileUnreadable;
+ m_codLoadStatus = CodFileUnreadable;
else
- m_codLoadtqStatus = ( ProgramFileTypeList::GetList().LoadProgramFile( & tempProcessor, fileName, pFile ) ) ? CodSuccess : CodFailure;
+ m_codLoadStatus = ( ProgramFileTypeList::GetList().LoadProgramFile( & tempProcessor, fileName, pFile ) ) ? CodSuccess : CodFailure;
#endif
m_pPicProcessor = dynamic_cast<pic_processor*>(tempProcessor);
- if ( codLoadtqStatus() == CodSuccess )
+ if ( codLoadStatus() == CodSuccess )
{
m_pRegisterMemory = new RegisterSet( m_pPicProcessor );
m_pDebugger[0] = new GpsimDebugger( GpsimDebugger::AsmDebugger, this );
@@ -154,9 +154,9 @@ GpsimProcessor::~GpsimProcessor()
}
-void GpsimProcessor::displayCodLoadtqStatus( )
+void GpsimProcessor::displayCodLoadStatus( )
{
- switch (m_codLoadtqStatus)
+ switch (m_codLoadStatus)
{
case CodSuccess:
break;
diff --git a/src/electronics/gpsimprocessor.h b/src/electronics/gpsimprocessor.h
index 9939be4..e2f0e4c 100644
--- a/src/electronics/gpsimprocessor.h
+++ b/src/electronics/gpsimprocessor.h
@@ -252,7 +252,7 @@ class GpsimProcessor : public TQObject
public:
/**
* Create a new gpsim processor. After calling this constructor, you
- * should always call codLoadtqStatus() to ensure that the cod file was
+ * should always call codLoadStatus() to ensure that the cod file was
* loaded successfully.
*/
GpsimProcessor( TQString symbolFile, TQObject *parent = 0 );
@@ -261,7 +261,7 @@ class GpsimProcessor : public TQObject
void setDebugMode( GpsimDebugger::Type mode ) { m_debugMode = mode; }
GpsimDebugger * currentDebugger() const { return m_pDebugger[m_debugMode]; }
- enum CodLoadtqStatus
+ enum CodLoadStatus
{
CodSuccess,
CodFileNotFound,
@@ -284,14 +284,14 @@ class GpsimProcessor : public TQObject
/**
* @return status of opening the COD file
- * @see displayCodLoadtqStatus
+ * @see displayCodLoadStatus
*/
- CodLoadtqStatus codLoadtqStatus() const { return m_codLoadtqStatus; }
+ CodLoadStatus codLoadStatus() const { return m_codLoadStatus; }
/**
- * Popups a messagebox to the user according to the CodLoadtqStatus. Will
- * only popup a messagebox if the CodLoadtqStatus wasn't CodSuccess.
+ * Popups a messagebox to the user according to the CodLoadStatus. Will
+ * only popup a messagebox if the CodLoadStatus wasn't CodSuccess.
*/
- void displayCodLoadtqStatus();
+ void displayCodLoadStatus();
/**
* Returns a list of source files for the currently running program.
*/
@@ -373,7 +373,7 @@ class GpsimProcessor : public TQObject
void emitLineReached();
pic_processor * m_pPicProcessor;
- CodLoadtqStatus m_codLoadtqStatus;
+ CodLoadStatus m_codLoadStatus;
const TQString m_symbolFile;
RegisterSet * m_pRegisterMemory;
GpsimDebugger::Type m_debugMode;
diff --git a/src/electronics/port.cpp b/src/electronics/port.cpp
index ec74bfc..124fe1d 100644
--- a/src/electronics/port.cpp
+++ b/src/electronics/port.cpp
@@ -277,7 +277,7 @@ void ParallelPort::reset()
{
m_file = -1;
m_reg[Data] = 0;
- m_reg[tqStatus] = 0;
+ m_reg[Status] = 0;
m_reg[Control] = 0;
m_outputPins = INPUT_MODE_BIT | IRTQ_MODE_BIT;
m_inputPins = ALWAYS_INPUT_PINS | INPUT_MODE_BIT | IRTQ_MODE_BIT;
@@ -309,7 +309,7 @@ int ParallelPort::pinState( int pins )
value |= ((readFromRegister( Data ) & ((pins & DATA_PINS) >> 0)) << 0);
if ( pins & STATUS_PINS )
- value |= ((readFromRegister( tqStatus ) & ((pins & STATUS_PINS) >> 8)) << 8);
+ value |= ((readFromRegister( Status ) & ((pins & STATUS_PINS) >> 8)) << 8);
if ( pins & CONTROL_PINS )
value |= ((readFromRegister( Control ) & ((pins & CONTROL_PINS) >> 16)) << 16);
diff --git a/src/electronics/port.h b/src/electronics/port.h
index d51cf5d..672bdcf 100644
--- a/src/electronics/port.h
+++ b/src/electronics/port.h
@@ -120,7 +120,7 @@ class ParallelPort : public Port
DATA_PINS = PIN02 | PIN03 | PIN04 | PIN05 | PIN06
| PIN07 | PIN08 | PIN09,
- // tqStatus Register
+ // Status Register
// Offset: Base + 1
// Read only
PIN15 = 1 << 11, // Error
@@ -146,7 +146,7 @@ class ParallelPort : public Port
enum Register
{
Data = 0,
- tqStatus = 1,
+ Status = 1,
Control = 2,
};
diff --git a/src/electronics/simulation/capacitance.cpp b/src/electronics/simulation/capacitance.cpp
index c289f90..9087c7f 100644
--- a/src/electronics/simulation/capacitance.cpp
+++ b/src/electronics/simulation/capacitance.cpp
@@ -101,9 +101,9 @@ void Capacitance::time_step()
i_eq_old = i_eq_new;
}
-bool Capacitance::updatetqStatus()
+bool Capacitance::updateStatus()
{
- b_status = Reactive::updatetqStatus();
+ b_status = Reactive::updateStatus();
if ( m_method == Capacitance::m_none ) b_status = false;
return b_status;
}
@@ -111,7 +111,7 @@ bool Capacitance::updatetqStatus()
void Capacitance::setMethod( Method m )
{
m_method = m;
- updatetqStatus();
+ updateStatus();
}
diff --git a/src/electronics/simulation/capacitance.h b/src/electronics/simulation/capacitance.h
index b26899c..ccc083d 100644
--- a/src/electronics/simulation/capacitance.h
+++ b/src/electronics/simulation/capacitance.h
@@ -42,7 +42,7 @@ public:
protected:
virtual void updateCurrents();
- virtual bool updatetqStatus();
+ virtual bool updateStatus();
private:
double m_cap; // Capacitance
diff --git a/src/electronics/simulation/element.cpp b/src/electronics/simulation/element.cpp
index dbcd02d..2411897 100644
--- a/src/electronics/simulation/element.cpp
+++ b/src/electronics/simulation/element.cpp
@@ -55,7 +55,7 @@ void Element::setElementSet( ElementSet *c )
p_eSet = c;
p_A = p_eSet->matrix();
p_b = p_eSet->b();
- updatetqStatus();
+ updateStatus();
}
void Element::componentDeleted()
@@ -113,7 +113,7 @@ void Element::setCNodes( const int n0, const int n1, const int n2, const int n3
p_cnode[1] = (n1>-1)?p_eSet->cnodes()[n1]:(n1==-1?p_eSet->ground():0l);
p_cnode[2] = (n2>-1)?p_eSet->cnodes()[n2]:(n2==-1?p_eSet->ground():0l);
p_cnode[3] = (n3>-1)?p_eSet->cnodes()[n3]:(n3==-1?p_eSet->ground():0l);
- updatetqStatus();
+ updateStatus();
}
void Element::setCBranches( const int b0, const int b1, const int b2, const int b3 )
@@ -128,10 +128,10 @@ void Element::setCBranches( const int b0, const int b1, const int b2, const int
p_cbranch[1] = (b1>-1)?p_eSet->cbranches()[b1]:0l;
p_cbranch[2] = (b2>-1)?p_eSet->cbranches()[b2]:0l;
p_cbranch[3] = (b3>-1)?p_eSet->cbranches()[b3]:0l;
- updatetqStatus();
+ updateStatus();
}
-bool Element::updatetqStatus()
+bool Element::updateStatus()
{
// First, set status to false if all nodes in use are ground
b_status = false;
diff --git a/src/electronics/simulation/element.h b/src/electronics/simulation/element.h
index 7b219c9..e05de46 100644
--- a/src/electronics/simulation/element.h
+++ b/src/electronics/simulation/element.h
@@ -188,7 +188,7 @@ protected:
/**
* Update the status, returning b_status
*/
- virtual bool updatetqStatus();
+ virtual bool updateStatus();
/**
* Set by child class - the number of branches that the element uses
* Typically, this is 0, but could be 1 (e.g. independent voltage source)
diff --git a/src/electronics/simulation/inductance.cpp b/src/electronics/simulation/inductance.cpp
index 6737ab6..22c5f9e 100644
--- a/src/electronics/simulation/inductance.cpp
+++ b/src/electronics/simulation/inductance.cpp
@@ -109,9 +109,9 @@ void Inductance::time_step()
}
-bool Inductance::updatetqStatus()
+bool Inductance::updateStatus()
{
- b_status = Reactive::updatetqStatus();
+ b_status = Reactive::updateStatus();
if ( m_method == Inductance::m_none )
b_status = false;
return b_status;
@@ -121,6 +121,6 @@ bool Inductance::updatetqStatus()
void Inductance::setMethod( Method m )
{
m_method = m;
- updatetqStatus();
+ updateStatus();
}
diff --git a/src/electronics/simulation/inductance.h b/src/electronics/simulation/inductance.h
index e4bd119..46ccb09 100644
--- a/src/electronics/simulation/inductance.h
+++ b/src/electronics/simulation/inductance.h
@@ -42,7 +42,7 @@ class Inductance : public Reactive
protected:
virtual void updateCurrents();
- virtual bool updatetqStatus();
+ virtual bool updateStatus();
private:
double m_inductance; // Inductance
diff --git a/src/electronics/simulation/reactive.cpp b/src/electronics/simulation/reactive.cpp
index c753f42..83fcfd4 100644
--- a/src/electronics/simulation/reactive.cpp
+++ b/src/electronics/simulation/reactive.cpp
@@ -26,11 +26,11 @@ Reactive::~Reactive()
void Reactive::setDelta( double delta )
{
m_delta = delta;
- updatetqStatus();
+ updateStatus();
}
-bool Reactive::updatetqStatus()
+bool Reactive::updateStatus()
{
- return Element::updatetqStatus();
+ return Element::updateStatus();
}
diff --git a/src/electronics/simulation/reactive.h b/src/electronics/simulation/reactive.h
index a93459b..1142b34 100644
--- a/src/electronics/simulation/reactive.h
+++ b/src/electronics/simulation/reactive.h
@@ -34,7 +34,7 @@ public:
virtual void time_step() = 0;
protected:
- virtual bool updatetqStatus();
+ virtual bool updateStatus();
double m_delta; // Delta time interval
};