Initial clang format/tidy fixes for level_2_chunks

This commit is contained in:
AdenKoperczak 2025-04-08 13:49:41 -04:00
parent 0bda6296c0
commit 0f95439b61
No known key found for this signature in database
GPG key ID: 9843017036F62EE7
9 changed files with 108 additions and 103 deletions

View file

@ -272,7 +272,8 @@ public:
common::Level3ProductCategoryMap availableCategoryMap_ {};
std::shared_mutex availableCategoryMutex_ {};
float incomingLevel2Elevation_ {-90};
float incomingLevel2Elevation_ {
provider::AwsLevel2ChunksDataProvider::INVALID_ELEVATION};
std::unordered_map<boost::uuids::uuid,
std::shared_ptr<ProviderManager>,
@ -654,7 +655,7 @@ void RadarProductManager::EnableRefresh(common::RadarProductGroup group,
{
if (group == common::RadarProductGroup::Level2)
{
//p->EnableRefresh(uuid, p->level2ProviderManager_, enabled);
// p->EnableRefresh(uuid, p->level2ProviderManager_, enabled);
p->EnableRefresh(uuid, p->level2ChunksProviderManager_, enabled);
}
else
@ -1431,7 +1432,7 @@ std::shared_ptr<types::RadarProductRecord>
RadarProductManagerImpl::StoreRadarProductRecord(
std::shared_ptr<types::RadarProductRecord> record)
{
//logger_->debug("StoreRadarProductRecord()");
// logger_->debug("StoreRadarProductRecord()");
std::shared_ptr<types::RadarProductRecord> storedRecord = nullptr;
@ -1571,9 +1572,10 @@ RadarProductManager::GetLevel2Data(wsr88d::rda::DataBlockType dataBlockType,
if (record != nullptr)
{
std::shared_ptr<wsr88d::rda::ElevationScan> recordRadarData = nullptr;
float recordElevationCut = 0.0f;
std::vector<float> recordElevationCuts;
std::shared_ptr<wsr88d::rda::ElevationScan> recordRadarData =
nullptr;
float recordElevationCut = 0.0f;
std::vector<float> recordElevationCuts;
std::tie(recordRadarData, recordElevationCut, recordElevationCuts) =
record->level2_file()->GetElevationScan(
@ -1595,10 +1597,14 @@ RadarProductManager::GetLevel2Data(wsr88d::rda::DataBlockType dataBlockType,
elevationCuts = std::move(recordElevationCuts);
foundTime = collectionTime;
if (p->incomingLevel2Elevation_ != -90)
if (p->incomingLevel2Elevation_ !=
provider::AwsLevel2ChunksDataProvider::INVALID_ELEVATION)
{
p->incomingLevel2Elevation_ = -90;
Q_EMIT IncomingLevel2ElevationChanged(-90);
p->incomingLevel2Elevation_ = provider::
AwsLevel2ChunksDataProvider::INVALID_ELEVATION;
Q_EMIT IncomingLevel2ElevationChanged(
provider::AwsLevel2ChunksDataProvider::
INVALID_ELEVATION);
}
}
}

View file

@ -661,7 +661,6 @@ float MapWidget::GetIncomingLevel2Elevation() const
return p->radarProductManager_->incoming_level_2_elevation();
}
common::Level2Product
MapWidgetImpl::GetLevel2ProductOrDefault(const std::string& productName) const
{

View file

@ -170,7 +170,7 @@ void RadarProductLayer::UpdateSweep()
std::try_to_lock);
if (!sweepLock.owns_lock())
{
//logger_->debug("Sweep locked, deferring update");
// logger_->debug("Sweep locked, deferring update");
return;
}
logger_->debug("UpdateSweep()");

View file

@ -30,15 +30,10 @@ public:
explicit Level2SettingsWidgetImpl(Level2SettingsWidget* self) :
self_ {self},
layout_ {new QVBoxLayout(self)},
elevationGroupBox_ {},
incomingElevationLabel_ {},
elevationButtons_ {},
elevationCuts_ {},
elevationButtonsChanged_ {false},
resizeElevationButtons_ {false},
settingsGroupBox_ {},
declutterCheckBox_ {}
elevationCuts_ {}
{
// NOLINTBEGIN(cppcoreguidelines-owning-memory) Qt takes care of this
layout_->setContentsMargins(0, 0, 0, 0);
incomingElevationLabel_ = new QLabel("", self);
@ -48,7 +43,6 @@ public:
new ui::FlowLayout(elevationGroupBox_);
layout_->addWidget(elevationGroupBox_);
settingsGroupBox_ = new QGroupBox(tr("Settings"), self);
QLayout* settingsLayout = new QVBoxLayout(settingsGroupBox_);
layout_->addWidget(settingsGroupBox_);
@ -57,6 +51,7 @@ public:
settingsLayout->addWidget(declutterCheckBox_);
settingsGroupBox_->setVisible(false);
// NOLINTEND(cppcoreguidelines-owning-memory) Qt takes care of this
QObject::connect(hotkeyManager_.get(),
&manager::HotkeyManager::HotkeyPressed,
@ -72,15 +67,15 @@ public:
Level2SettingsWidget* self_;
QLayout* layout_;
QGroupBox* elevationGroupBox_;
QLabel* incomingElevationLabel_;
QGroupBox* elevationGroupBox_ {};
QLabel* incomingElevationLabel_ {};
std::list<QToolButton*> elevationButtons_;
std::vector<float> elevationCuts_;
bool elevationButtonsChanged_;
bool resizeElevationButtons_;
bool elevationButtonsChanged_ {};
bool resizeElevationButtons_ {};
QGroupBox* settingsGroupBox_;
QCheckBox* declutterCheckBox_;
QGroupBox* settingsGroupBox_ {};
QCheckBox* declutterCheckBox_ {};
float currentElevation_ {};
QToolButton* currentElevationButton_ {nullptr};
@ -249,8 +244,9 @@ void Level2SettingsWidget::UpdateElevationSelection(float elevation)
void Level2SettingsWidget::UpdateIncomingElevation(float incomingElevation)
{
p->incomingElevationLabel_->setText("Incoming Elevation: " +
QString::number(incomingElevation, 'f', 1) + common::Characters::DEGREE);
p->incomingElevationLabel_->setText(
"Incoming Elevation: " + QString::number(incomingElevation, 'f', 1) +
common::Characters::DEGREE);
}
void Level2SettingsWidget::UpdateSettings(map::MapWidget* activeMap)
@ -258,8 +254,8 @@ void Level2SettingsWidget::UpdateSettings(map::MapWidget* activeMap)
std::optional<float> currentElevationOption = activeMap->GetElevation();
const float currentElevation =
currentElevationOption.has_value() ? *currentElevationOption : 0.0f;
std::vector<float> elevationCuts = activeMap->GetElevationCuts();
float incomingElevation = activeMap->GetIncomingLevel2Elevation();
std::vector<float> elevationCuts = activeMap->GetElevationCuts();
const float incomingElevation = activeMap->GetIncomingLevel2Elevation();
if (p->elevationCuts_ != elevationCuts)
{