Skip to content

Commit

Permalink
feat(ui): Display pressure also in inHg on weather page
Browse files Browse the repository at this point in the history
Fixes #217
  • Loading branch information
ltoenning committed Nov 26, 2023
1 parent f3f777e commit 488f9dc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/blackgui/components/weathercomponent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,9 @@ namespace BlackGui::Components
ui->tvp_CloudLayers->updateContainer(gridPoint.getCloudLayers());
ui->tvp_WindLayers->updateContainer(gridPoint.getWindLayers());
const CCoordinateGeodetic position = gridPoint.getPosition();
const double pressureAtMsl = gridPoint.getPressureAtMsl().value(CPressureUnit::hPa());
const QString status = QStringLiteral("Weather Position: %1 %2\nPressure (MSL): %3 hPa").arg(position.latitude().toWgs84(), position.longitude().toWgs84()).arg(pressureAtMsl);
const double pressureAtMslHpa = gridPoint.getPressureAtMsl().value(CPressureUnit::hPa());
const double pressureAtMslInHg = gridPoint.getPressureAtMsl().value(CPressureUnit::inHg());
const QString status = QStringLiteral("Weather Position: %1 %2\nPressure (MSL): %3 hPa / %4 inHg").arg(position.latitude().toWgs84(), position.longitude().toWgs84()).arg(pressureAtMslHpa).arg(pressureAtMslInHg);
ui->lbl_Status->setText(status);
}

Expand Down

0 comments on commit 488f9dc

Please sign in to comment.