Skip to content

Commit d5cdeaa

Browse files
committed
Fix print average function schedule
if pms value invalid show the channel
1 parent 09207c6 commit d5cdeaa

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/AgValue.cpp

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -656,67 +656,67 @@ void Measurements::printCurrentPMAverage(int ch) {
656656
if (utils::isValidPm(_pm_01[idx].update.avg)) {
657657
Serial.printf("[%d] Atmospheric PM 1.0 = %.2f ug/m3\n", ch, _pm_01[idx].update.avg);
658658
} else {
659-
Serial.printf("[%d] Atmospheric PM 1.0 = -\n");
659+
Serial.printf("[%d] Atmospheric PM 1.0 = -\n", ch);
660660
}
661661
if (utils::isValidPm(_pm_25[idx].update.avg)) {
662662
Serial.printf("[%d] Atmospheric PM 2.5 = %.2f ug/m3\n", ch, _pm_25[idx].update.avg);
663663
} else {
664-
Serial.printf("[%d] Atmospheric PM 2.5 = -\n");
664+
Serial.printf("[%d] Atmospheric PM 2.5 = -\n", ch);
665665
}
666666
if (utils::isValidPm(_pm_10[idx].update.avg)) {
667667
Serial.printf("[%d] Atmospheric PM 10 = %.2f ug/m3\n", ch, _pm_10[idx].update.avg);
668668
} else {
669-
Serial.printf("[%d] Atmospheric PM 10 = -\n");
669+
Serial.printf("[%d] Atmospheric PM 10 = -\n", ch);
670670
}
671671
if (utils::isValidPm(_pm_01_sp[idx].update.avg)) {
672672
Serial.printf("[%d] Standard Particle PM 1.0 = %.2f ug/m3\n", ch, _pm_01_sp[idx].update.avg);
673673
} else {
674-
Serial.printf("[%d] Standard Particle PM 1.0 = -\n");
674+
Serial.printf("[%d] Standard Particle PM 1.0 = -\n", ch);
675675
}
676676
if (utils::isValidPm(_pm_25_sp[idx].update.avg)) {
677677
Serial.printf("[%d] Standard Particle PM 2.5 = %.2f ug/m3\n", ch, _pm_25_sp[idx].update.avg);
678678
} else {
679-
Serial.printf("[%d] Standard Particle PM 2.5 = -\n");
679+
Serial.printf("[%d] Standard Particle PM 2.5 = -\n", ch);
680680
}
681681
if (utils::isValidPm(_pm_10_sp[idx].update.avg)) {
682682
Serial.printf("[%d] Standard Particle PM 10 = %.2f ug/m3\n", ch, _pm_10_sp[idx].update.avg);
683683
} else {
684-
Serial.printf("[%d] Standard Particle PM 10 = -\n");
684+
Serial.printf("[%d] Standard Particle PM 10 = -\n", ch);
685685
}
686686
if (utils::isValidPm03Count(_pm_03_pc[idx].update.avg)) {
687687
Serial.printf("[%d] Particle Count 0.3 = %.1f\n", ch, _pm_03_pc[idx].update.avg);
688688
} else {
689-
Serial.printf("[%d] Particle Count 0.3 = -\n");
689+
Serial.printf("[%d] Particle Count 0.3 = -\n", ch);
690690
}
691691
if (utils::isValidPm03Count(_pm_05_pc[idx].update.avg)) {
692692
Serial.printf("[%d] Particle Count 0.5 = %.1f\n", ch, _pm_05_pc[idx].update.avg);
693693
} else {
694-
Serial.printf("[%d] Particle Count 0.5 = -\n");
694+
Serial.printf("[%d] Particle Count 0.5 = -\n", ch);
695695
}
696696
if (utils::isValidPm03Count(_pm_01_pc[idx].update.avg)) {
697697
Serial.printf("[%d] Particle Count 1.0 = %.1f\n", ch, _pm_01_pc[idx].update.avg);
698698
} else {
699-
Serial.printf("[%d] Particle Count 1.0 = -\n");
699+
Serial.printf("[%d] Particle Count 1.0 = -\n", ch);
700700
}
701701
if (utils::isValidPm03Count(_pm_25_pc[idx].update.avg)) {
702702
Serial.printf("[%d] Particle Count 2.5 = %.1f\n", ch, _pm_25_pc[idx].update.avg);
703703
} else {
704-
Serial.printf("[%d] Particle Count 2.5 = -\n");
704+
Serial.printf("[%d] Particle Count 2.5 = -\n", ch);
705705
}
706706

707707
if (_pm_5_pc[idx].listValues.empty() == false) {
708708
if (utils::isValidPm03Count(_pm_5_pc[idx].update.avg)) {
709709
Serial.printf("[%d] Particle Count 5.0 = %.1f\n", ch, _pm_5_pc[idx].update.avg);
710710
} else {
711-
Serial.printf("[%d] Particle Count 5.0 = -\n");
711+
Serial.printf("[%d] Particle Count 5.0 = -\n", ch);
712712
}
713713
}
714714

715715
if (_pm_10_pc[idx].listValues.empty() == false) {
716716
if (utils::isValidPm03Count(_pm_10_pc[idx].update.avg)) {
717717
Serial.printf("[%d] Particle Count 10 = %.1f\n", ch, _pm_10_pc[idx].update.avg);
718718
} else {
719-
Serial.printf("[%d] Particle Count 10 = -\n");
719+
Serial.printf("[%d] Particle Count 10 = -\n", ch);
720720
}
721721
}
722722
}

0 commit comments

Comments
 (0)