From c0b6e9a93b9b2e3d86b9d56aac48519465341965 Mon Sep 17 00:00:00 2001 From: Christopher Young Date: Wed, 19 Apr 2017 16:49:35 -0400 Subject: [PATCH] Set "Maintenance Req'd" bit in GDL90 heartbeat when there exists a system error. #567. --- main/gen_gdl90.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/main/gen_gdl90.go b/main/gen_gdl90.go index 4d8d524e..42db916d 100755 --- a/main/gen_gdl90.go +++ b/main/gen_gdl90.go @@ -574,6 +574,11 @@ func makeHeartbeat() []byte { } msg[1] = msg[1] | 0x10 //FIXME: Addr talkback. + // "Maintenance Req'd". Add flag if there are any current critical system errors. + if len(globalStatus.Errors) > 0 { + msg[1] = msg[1] | 0x40 + } + nowUTC := time.Now().UTC() // Seconds since 0000Z. midnightUTC := time.Date(nowUTC.Year(), nowUTC.Month(), nowUTC.Day(), 0, 0, 0, 0, time.UTC)