[Companion] Move some single-use functions out of helpers module; cosmetics.

This commit is contained in:
Max Paperno
2018-06-04 05:15:16 -04:00
parent 8de53f18e6
commit 41419b4cee
5 changed files with 92 additions and 119 deletions
+17
View File
@@ -93,6 +93,23 @@ void TelemetryAnalog::update()
ui->CalibSB->setValue(mini);
}
static int findmult(float value, float base)
{
int vvalue = value*10;
int vbase = base*10;
vvalue--;
int mult = 0;
for (int i=8; i>=0; i--) {
if (vvalue/vbase >= (1<<i)) {
mult = i+1;
break;
}
}
return mult;
}
void TelemetryAnalog::on_UnitCB_currentIndexChanged(int index)
{
float ratio = analog.getRatio();