diff --git a/openrtx/include/settings.h b/openrtx/include/settings.h index df11bac3..da34e56f 100644 --- a/openrtx/include/settings.h +++ b/openrtx/include/settings.h @@ -21,6 +21,8 @@ #ifndef SETTINGS_H #define SETTINGS_H +#include + typedef struct { uint8_t valid[7]; // Should contain "OPNRTX" in a valid settings_t @@ -35,12 +37,16 @@ __attribute__((packed)) settings_t; static const settings_t default_settings = { - "OPNRTX", // Settings valid string - 255, // Brightness - 71, // Contrast - 0, // UTC Timezone - false, // GPS enabled - true // GPS set time + "OPNRTX", // Settings valid string + 255, // Brightness +#ifdef SCREEN_CONTRAST + DEFAULT_CONTRAST, // Contrast +#else + 255, // Contrast +#endif + 0, // UTC Timezone + false, // GPS enabled + true // GPS set time }; #endif /* SETTINGS_H */ diff --git a/platform/targets/DM-1801/hwconfig.h b/platform/targets/DM-1801/hwconfig.h index d497e687..887dd01f 100644 --- a/platform/targets/DM-1801/hwconfig.h +++ b/platform/targets/DM-1801/hwconfig.h @@ -42,6 +42,7 @@ /* Screen has adjustable contrast */ #define SCREEN_CONTRAST +#define DEFAULT_CONTRAST 71 /* Battery type */ #define BAT_LIPO_2S diff --git a/platform/targets/GD-77/hwconfig.h b/platform/targets/GD-77/hwconfig.h index 380c13e3..751415c8 100644 --- a/platform/targets/GD-77/hwconfig.h +++ b/platform/targets/GD-77/hwconfig.h @@ -42,6 +42,7 @@ /* Screen has adjustable contrast */ #define SCREEN_CONTRAST +#define DEFAULT_CONTRAST 71 /* Battery type */ #define BAT_LIPO_2S diff --git a/platform/targets/MD-9600/hwconfig.h b/platform/targets/MD-9600/hwconfig.h index 8dc1e2f3..d312fcfb 100644 --- a/platform/targets/MD-9600/hwconfig.h +++ b/platform/targets/MD-9600/hwconfig.h @@ -45,6 +45,7 @@ /* Screen has adjustable contrast */ #define SCREEN_CONTRAST +#define DEFAULT_CONTRAST 91 /* Screen pixel format */ #define PIX_FMT_BW diff --git a/platform/targets/linux/hwconfig.h b/platform/targets/linux/hwconfig.h index 4ac36971..2606a012 100644 --- a/platform/targets/linux/hwconfig.h +++ b/platform/targets/linux/hwconfig.h @@ -24,9 +24,6 @@ /* Device supports an optional GPS chip */ #define HAS_GPS -/* Screen has adjustable contrast */ -#define SCREEN_CONTRAST - /* Supported radio bands */ #define BAND_VHF #define BAND_UHF