You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Tässä esimerkissä haetaan anturin kalibrointikäyrän arvot Sqlite tietokannasta

bool SensorUnlinearityCorrection::LoadFromDatabase()
{
    int i;
    double idealValue, measuredValue;
    QSqlQueryModel model;
    model.setQuery("SELECT todellinen, mitattu FROM sensori");
    CorrectVal.clear();
    ValFromSensor.clear();
    for (i = 0; i < model.rowCount(); i++) {
        idealValue = model.record(i).value("todellinenl").toDouble();
        measuredValue = model.record(i).value("measured").toDouble();
        CorrectVal.append(idealValue);
        ValFromSensor.append((measuredValue));
    }
    return true;
}

 ddd
 ddd
 ddd
 ddd
  • No labels
You must log in to comment.