[Companion] Telemetry sensor ratio/offset weren't imported

This commit is contained in:
Andre Bernet
2015-03-31 16:14:37 +04:00
parent 4a9aa52f28
commit 50fa9a4dfd
3 changed files with 4 additions and 2 deletions
@@ -2730,6 +2730,8 @@ class SensorField: public TransformedField {
if (sensor.type == SensorData::TYPE_CUSTOM) { if (sensor.type == SensorData::TYPE_CUSTOM) {
sensor.id = _id; sensor.id = _id;
sensor.instance = _instance; sensor.instance = _instance;
sensor.ratio = _param & 0xFF;
sensor.offset = (_param >> 16) & 0xFF;
} }
else { else {
sensor.persistentValue = _id; sensor.persistentValue = _id;
+1 -1
View File
@@ -643,7 +643,7 @@ void TelemetrySensorPanel::on_unit_currentIndexChanged(int index)
} }
} }
void TelemetrySensorPanel::on_prec_editingFinished() void TelemetrySensorPanel::on_prec_valueChanged()
{ {
if (!lock) { if (!lock) {
sensor.prec = ui->prec->value(); sensor.prec = ui->prec->value();
+1 -1
View File
@@ -95,7 +95,7 @@ class TelemetrySensorPanel: public ModelPanel
void on_type_currentIndexChanged(int index); void on_type_currentIndexChanged(int index);
void on_formula_currentIndexChanged(int index); void on_formula_currentIndexChanged(int index);
void on_unit_currentIndexChanged(int index); void on_unit_currentIndexChanged(int index);
void on_prec_editingFinished(); void on_prec_valueChanged();
protected: protected:
void updateSourcesComboBox(AutoComboBox * cb, bool negative); void updateSourcesComboBox(AutoComboBox * cb, bool negative);