@@ -108,7 +108,7 @@ void BlockageDiagComponent::onBlockageChecker(DiagnosticStatusWrapper & stat)
108
108
// TODO(badai-nguyen): consider sky_blockage_ratio_ for DiagnosticsStatus." [todo]
109
109
110
110
auto level = DiagnosticStatus::OK;
111
- std::string msg;
111
+ std::string msg = " OK " ;
112
112
if (ground_blockage_ratio_ < 0 ) {
113
113
level = DiagnosticStatus::STALE;
114
114
msg = " STALE" ;
@@ -120,9 +120,6 @@ void BlockageDiagComponent::onBlockageChecker(DiagnosticStatusWrapper & stat)
120
120
} else if (ground_blockage_ratio_ > 0 .0f ) {
121
121
level = DiagnosticStatus::WARN;
122
122
msg = " WARN" ;
123
- } else {
124
- level = DiagnosticStatus::OK;
125
- msg = " OK" ;
126
123
}
127
124
128
125
if ((ground_blockage_ratio_ > 0 .0f ) && (sky_blockage_ratio_ > 0 .0f )) {
@@ -139,7 +136,7 @@ void BlockageDiagComponent::dustChecker(diagnostic_updater::DiagnosticStatusWrap
139
136
{
140
137
stat.add (" ground_dust_ratio" , std::to_string (ground_dust_ratio_));
141
138
auto level = DiagnosticStatus::OK;
142
- std::string msg;
139
+ std::string msg = " OK " ;
143
140
if (ground_dust_ratio_ < 0 .0f ) {
144
141
level = DiagnosticStatus::STALE;
145
142
msg = " STALE" ;
@@ -150,9 +147,6 @@ void BlockageDiagComponent::dustChecker(diagnostic_updater::DiagnosticStatusWrap
150
147
} else if (ground_dust_ratio_ > 0 .0f ) {
151
148
level = DiagnosticStatus::WARN;
152
149
msg = " WARN" ;
153
- } else {
154
- level = DiagnosticStatus::OK;
155
- msg = " OK" ;
156
150
}
157
151
158
152
if (ground_dust_ratio_ > 0 .0f ) {
0 commit comments