diff --git a/ground/src/plugins/airspeed/airspeedgadgetwidget.cpp b/ground/src/plugins/airspeed/airspeedgadgetwidget.cpp index d13e2a18f..e93a98925 100644 --- a/ground/src/plugins/airspeed/airspeedgadgetwidget.cpp +++ b/ground/src/plugins/airspeed/airspeedgadgetwidget.cpp @@ -212,11 +212,11 @@ void AirspeedGadgetWidget::resizeEvent(QResizeEvent *event) // Converts the value into an angle: // this enables smooth rotation in rotateNeedles below void AirspeedGadgetWidget::setNeedle1(double value) { - needle1Target = 360*value/n1MaxValue; + needle1Target = 360*value/(n1MaxValue-n1MinValue); } void AirspeedGadgetWidget::setNeedle2(double value) { - needle2Target = 360*value/n2MaxValue; + needle2Target = 360*value/(n2MaxValue-n2MinValue); } diff --git a/ground/src/plugins/airspeed/airspeedgadgetwidget.h b/ground/src/plugins/airspeed/airspeedgadgetwidget.h index b81dbe093..d3954d4ee 100644 --- a/ground/src/plugins/airspeed/airspeedgadgetwidget.h +++ b/ground/src/plugins/airspeed/airspeedgadgetwidget.h @@ -54,7 +54,7 @@ public: void setNeedle2(double value); void setN1Min(double value) {n1MinValue = value;} void setN1Max(double value) {n1MaxValue = value;} - void setN2Min(double value) {n1MinValue = value;} + void setN2Min(double value) {n2MinValue = value;} void setN2Max(double value) {n2MaxValue = value;} // Sets up needle/UAVObject connections: void connectNeedles(QString object1, QString field1,