Video Overlays - Load is target power or Slope according to mode

Similar to DialWindow
Added to sample video-layout.xml and adjust positions
This commit is contained in:
Ale Martinez
2019-12-15 16:49:02 -03:00
committed by Alejandro Martinez
parent e06c93ca0e
commit a3e6ab8e09
2 changed files with 14 additions and 5 deletions

View File

@@ -327,8 +327,13 @@ void VideoWindow::telemetryUpdate(RealtimeData rtd)
}
else if (p_meterWidget->Source() == QString("Load"))
{
p_meterWidget->Value = rtd.getLoad();
p_meterWidget->Text = QString::number((int)p_meterWidget->Value);
if (rtd.mode == ERG || rtd.mode == MRC) {
p_meterWidget->Value = rtd.getLoad();
p_meterWidget->Text = QString("%1").arg(round(p_meterWidget->Value));
} else {
p_meterWidget->Value = rtd.getSlope();
p_meterWidget->Text = QString("%1").arg(p_meterWidget->Value, 0, 'f', 1);
}
}
else if (p_meterWidget->Source() == QString("Distance"))
{