From 07c08c09a36d13a82472521ca01c4074af97d192 Mon Sep 17 00:00:00 2001 From: Randy Mackay Date: Fri, 20 Jan 2017 14:41:08 +0900 Subject: [PATCH] AP_Notify: small change to Display health logic --- libraries/AP_Notify/Display.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/libraries/AP_Notify/Display.cpp b/libraries/AP_Notify/Display.cpp index 3a3935b958..0b453c9588 100644 --- a/libraries/AP_Notify/Display.cpp +++ b/libraries/AP_Notify/Display.cpp @@ -379,13 +379,11 @@ bool Display::init(void) break; } - if (_driver != nullptr) { - _healthy = _driver->hw_init(); - } - - if (!_healthy) { + if (!_driver || !_driver->hw_init()) { + _healthy = false; return false; } + _healthy = true; // update all on display update_all();