Você não pode selecionar mais de 25 tópicos
Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
|
- #include "InputConnector.h"
-
- CInputConnector::CInputConnector()
- {
- }
-
- QBitArray CInputConnector::GetInputPinsStates()
- {
-
- if(!IsConnectorDefined())
- return QBitArray();
-
- QBitArray IOStates = mIOInterfaceHandle->GetInputStates();//inputs are active low, need to invert!!!
- QBitArray PinsStates(mPinCount);
-
- if(mIOModuleRangeEnd > IOStates.size()) //try not to crash!
- {
- qDebug("Logic error in CInputConnector::GetInputPinsStates(); mIOModuleRangeEnd greater than IO count");
- return QBitArray();
- }
-
-
- int ConnectorPin = 0;
- for(int IoPin = mIOModuleRangeBegin; IoPin <= mIOModuleRangeEnd; IoPin++)
- {
- PinsStates[ConnectorPin++] = IOStates[IoPin];
- }
- return PinsStates;
- }
|