src/DetailiSpindel.cpp

changeset 499
10d208fa6c74
parent 494
49ac23d25f61
child 500
cf75e6fadcb1
equal deleted inserted replaced
498:c6f957fa7442 499:10d208fa6c74
141 } 141 }
142 142
143 double batt = query.value("battery").toDouble() - 3.064; // 0% voltage 143 double batt = query.value("battery").toDouble() - 3.064; // 0% voltage
144 if (batt < 0) 144 if (batt < 0)
145 batt = 0; 145 batt = 0;
146 batt = round(batt / 1.17875 * 1000.0) / 10; // 100% range 146 batt = round(batt / 1.05 * 1000.0) / 10; // 100% range. Was 1.17875
147 if (batt > 100) 147 if (batt > 100)
148 batt = 100; 148 batt = 100;
149 ui->batVal->setText(QString("%1%").arg(batt, 2, 'f', 1, '0')); 149 ui->batVal->setText(QString("%1%").arg(batt, 2, 'f', 1, '0'));
150 150
151 ui->thermoBox->show(); 151 ui->thermoBox->show();

mercurial