From 95b28eb222e0c8bbcdac29a00bb5a59c9419336e Mon Sep 17 00:00:00 2001 From: fvanroie Date: Mon, 12 Dec 2022 20:45:11 +0100 Subject: [PATCH] Add HASP_START_DIM, HASP_START_PAGE and HASP_THEME_ID --- src/hasp/hasp.cpp | 6 +++--- src/hasp/hasp.h | 12 ++++++++++++ 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/hasp/hasp.cpp b/src/hasp/hasp.cpp index 8351d061..e1b04218 100644 --- a/src/hasp/hasp.cpp +++ b/src/hasp/hasp.cpp @@ -78,9 +78,9 @@ static uint16_t sleepTimeShort = 60; // 1 second resolution static uint16_t sleepTimeLong = 120; // 1 second resolution static uint32_t sleepTimeOffset = 0; // 1 second resolution -uint8_t haspStartDim = 255; -uint8_t haspStartPage = 1; -uint8_t haspThemeId = 2; +uint8_t haspStartDim = HASP_START_DIM; +uint8_t haspStartPage = HASP_START_PAGE; +uint8_t haspThemeId = HASP_THEME_ID; uint16_t haspThemeHue = 200; lv_color_t color_primary = lv_color_hsv_to_rgb(200, 100, 100); lv_color_t color_secondary = lv_color_hsv_to_rgb(200, 100, 100); diff --git a/src/hasp/hasp.h b/src/hasp/hasp.h index ffa2cba3..2a879ee6 100644 --- a/src/hasp/hasp.h +++ b/src/hasp/hasp.h @@ -10,6 +10,18 @@ #include "hasplib.h" +#ifndef HASP_START_DIM +#define HASP_START_DIM 255 +#endif + +#ifndef HASP_START_PAGE +#define HASP_START_PAGE 1 +#endif + +#ifndef HASP_THEME_ID +#define HASP_THEME_ID 2 +#endif + #if HASP_USE_DEBUG > 0 #include "../hasp_debug.h" #include "dev/device.h"