AP_Notify: use minimize_features.inc for more features

This commit is contained in:
Peter Barker 2023-06-01 11:21:45 +10:00 committed by Andrew Tridgell
parent afccfee001
commit 1509cfc2b4
3 changed files with 16 additions and 4 deletions

View File

@ -8,6 +8,10 @@
#endif
#include <AP_SerialLED/AP_SerialLED_config.h>
#ifndef HAL_DISPLAY_ENABLED
#define HAL_DISPLAY_ENABLED 1
#endif
#ifndef AP_NOTIFY_LP5562_ENABLED
#define AP_NOTIFY_LP5562_ENABLED 1
#endif

View File

@ -14,6 +14,10 @@
*/
/* Notify display driver for 128 x 64 pixel displays */
#include "AP_Notify_config.h"
#if HAL_DISPLAY_ENABLED
#include "Display.h"
#include "Display_SH1106_I2C.h"
@ -587,3 +591,5 @@ void Display::update_text(uint8_t r)
draw_text(COLUMN(0), ROW(0), msg);
}
#endif // HAL_DISPLAY_ENABLED

View File

@ -1,10 +1,10 @@
#pragma once
#include "NotifyDevice.h"
#include "AP_Notify_config.h"
#ifndef HAL_DISPLAY_ENABLED
#define HAL_DISPLAY_ENABLED !HAL_MINIMIZE_FEATURES
#endif
#if HAL_DISPLAY_ENABLED
#include "NotifyDevice.h"
#define ROW(Y) ((Y * 10) + 6)
#define COLUMN(X) ((X * 7) + 0)
@ -43,3 +43,5 @@ private:
// stop showing text in display after this many millis:
const uint16_t _send_text_valid_millis = 20000;
};
#endif // HAL_DISPLAY_ENABLED