fix(blackbox): a buzzer named by the lamps of its buzzing samples only

This commit is contained in:
maj00r
2026-11-16 02:21:23 +01:00
parent aebfaf34ac
commit 8baf2149ea

View File

@@ -200,8 +200,8 @@ public sealed class EventList : ListBox
var brakings = recording.SecurityBrakings();
foreach (var span in recording.SecurityAlarms())
{
// The lamps of all its samples: one buzzer for both, the other may join it before it's acknowledged.
var lamps = recording.Cab.Where(c => c.Time >= span.Start && c.Time <= span.End)
// The lamps of all its buzzing samples: one buzzer for both, the other may join it before it's acknowledged.
var lamps = recording.Cab.Where(c => c.Time >= span.Start && c.Time <= span.End && (c.VigilanceBuzzer || c.CabSignalBuzzer))
.Aggregate(SecurityFlags.None, (all, c) => all | c.Security);
string who = ProtectionName(lamps);
var before = recording.CabAt(span.Start);