Example #1
0
int ADHighAccuracy::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QWidget::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: on_settings_clicked(); break;
        case 1: on_comboBox_currentIndexChanged((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 2: on_doubleSpinBox_6_valueChanged((*reinterpret_cast< double(*)>(_a[1]))); break;
        case 3: on_spnFSBits_3_valueChanged((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 4: on_butGP7_3_clicked(); break;
        case 5: on_butGP6_3_clicked(); break;
        case 6: on_butGP5_3_clicked(); break;
        case 7: on_butGP4_3_clicked(); break;
        case 8: on_butGP3_3_clicked(); break;
        case 9: on_butGP2_3_clicked(); break;
        case 10: on_butGP1_3_clicked(); break;
        case 11: on_butGP0_3_clicked(); break;
        case 12: on_butFullScale_3_clicked(); break;
        case 13: on_butOffset_3_clicked(); break;
        case 14: on_butGPCon_3_clicked(); break;
        case 15: on_butData_3_clicked(); break;
        case 16: on_butConfig_3_clicked(); break;
        case 17: on_butMode_3_clicked(); break;
        case 18: on_butChipID_3_clicked(); break;
        case 19: on_butStatus_3_clicked(); break;
        case 20: on_butReset_3_clicked(); break;
        case 21: on_butA4Com_3_clicked(); break;
        case 22: on_butA3Com_3_clicked(); break;
        case 23: on_butA2Com_3_clicked(); break;
        case 24: on_butAinCOm_3_clicked(); break;
        case 25: on_butA2A2_3_clicked(); break;
        case 26: on_butTempSensor_3_clicked(); break;
        case 27: on_butA3A4_3_clicked(); break;
        case 28: on_butA1A2_3_clicked(); break;
        case 29: on_cmdRWop_3_currentIndexChanged((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 30: on_cmbADCSel_3_currentIndexChanged((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 31: on_cmbOPParity_3_currentIndexChanged((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 32: on_cmbOPData_3_currentIndexChanged((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 33: on_cmbClock_3_currentIndexChanged((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 34: on_cmbZeroLatency_3_currentIndexChanged((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 35: on_cmbFilter_3_currentIndexChanged((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 36: on_cmbModes_3_currentIndexChanged((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 37: on_cmbRefDetect_3_currentIndexChanged((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 38: on_cmbRefSelect_3_currentIndexChanged((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 39: on_cmbHzReject_3_currentIndexChanged((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 40: on_cmbDiagnostic_3_currentIndexChanged((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 41: on_cmbChopping_3_currentIndexChanged((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 42: on_cmbBuffer_3_currentIndexChanged((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 43: on_cmbPolarity_3_currentIndexChanged((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 44: on_cmbGain_3_currentIndexChanged((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 45: on_butStTimer_clicked(); break;
        case 46: checkADC(); break;
        default: ;
        }
        _id -= 47;
    }
    return _id;
}
Example #2
0
ADHighAccuracy::ADHighAccuracy(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::ADHighAccuracy)
{
    ui->setupUi(this);
    InitialiseRegisterMap();
    InitialiseHWLibraries();
    enableRichGUI();
//    if(QFile(m_strADCSettingsFile).exists())
//    	loadSettings();
    mTimer = new QTimer(this);
    connect(mTimer, SIGNAL(timeout()), this, SLOT(checkADC()));
}
Example #3
0
int16_t main(void)
{
	//TODO discharge calculations
	int i = LTC3;
	int j;
	char voltages[19];
	int selfCheck = 0;

	configPins();
	configClock();
	

	//Comment out next 5 lines if debugging
	selfCheck += initLTC();
	selfCheck += initADC();//initADC();
	if(selfCheck == 2){
		setRelay(RELAY_ON);
	}

    while(1)
    {	
		//comment out next 4 lines if debugging
		for(i = LTC1; i < LTC_ALL; i++){
			LTC_readVoltages(i);
		}
		checkADC();


		//uncomment next 0 lines if debugging RS-485
		
		//unComment next 3 lines if debugging LTC
		//LTC_writeConfig(LTC_ALL, 0);
		//LTC_readVoltages(i);
		//LTC_analyzeVolts(i);

		//uncomment out next 3 lines if debugging ADC
//		j = ADCReadRaw(TEMP1_CHANNEL);
//		j++;
//		j--;
	}
}