void getMD49data (void){
	getSpeed1();
	getSpeed2();
	readEncoderValues();
	getVolts();
	getCurrent1();
	getCurrent2();
	getError();
	getMode();
	getAcceleration();
	i2cdata[31]=statusRegulator;
	i2cdata[32]=statusTimeout;
}
Пример #2
0
void ConnectionWindow::handleOKButton()
{
    QString conn;
    int connType = 0;

    if (ui->rbGVRET->isChecked())
    {
        conn = "GVRET";
        connType = 0;
        currentConnType = ConnectionType::GVRET_SERIAL;
    }

    if (ui->rbKvaser->isChecked())
    {
        conn = "KVASER";
        connType = 1;
        currentConnType = ConnectionType::KVASER;
    }

    if (ui->rbSocketCAN->isChecked())
    {
        conn = "SOCKETCAN";
        connType = 2;
        currentConnType = ConnectionType::SOCKETCAN;
    }

    currentPortName = getPortName();
    currentSpeed1 = getSpeed0();
    currentSpeed2 = getSpeed1();

    settings->setValue("Main/DefaultConnectionPort", currentPortName);
    settings->setValue("Main/DefaultConnectionType", connType);
    settings->setValue("Main/SingleWireMode", ui->ckSingleWire->isChecked());

    emit updateConnectionSettings(conn, getPortName(), getSpeed0(), getSpeed1());

    this->close();
}