Add default contrast setting define

This commit is contained in:
Federico Amedeo Izzo 2021-04-11 09:10:08 +02:00
parent a17e50edef
commit 93d2ede113
5 changed files with 15 additions and 9 deletions

View File

@ -21,6 +21,8 @@
#ifndef SETTINGS_H #ifndef SETTINGS_H
#define SETTINGS_H #define SETTINGS_H
#include <hwconfig.h>
typedef struct typedef struct
{ {
uint8_t valid[7]; // Should contain "OPNRTX" in a valid settings_t 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 = static const settings_t default_settings =
{ {
"OPNRTX", // Settings valid string "OPNRTX", // Settings valid string
255, // Brightness 255, // Brightness
71, // Contrast #ifdef SCREEN_CONTRAST
0, // UTC Timezone DEFAULT_CONTRAST, // Contrast
false, // GPS enabled #else
true // GPS set time 255, // Contrast
#endif
0, // UTC Timezone
false, // GPS enabled
true // GPS set time
}; };
#endif /* SETTINGS_H */ #endif /* SETTINGS_H */

View File

@ -42,6 +42,7 @@
/* Screen has adjustable contrast */ /* Screen has adjustable contrast */
#define SCREEN_CONTRAST #define SCREEN_CONTRAST
#define DEFAULT_CONTRAST 71
/* Battery type */ /* Battery type */
#define BAT_LIPO_2S #define BAT_LIPO_2S

View File

@ -42,6 +42,7 @@
/* Screen has adjustable contrast */ /* Screen has adjustable contrast */
#define SCREEN_CONTRAST #define SCREEN_CONTRAST
#define DEFAULT_CONTRAST 71
/* Battery type */ /* Battery type */
#define BAT_LIPO_2S #define BAT_LIPO_2S

View File

@ -45,6 +45,7 @@
/* Screen has adjustable contrast */ /* Screen has adjustable contrast */
#define SCREEN_CONTRAST #define SCREEN_CONTRAST
#define DEFAULT_CONTRAST 91
/* Screen pixel format */ /* Screen pixel format */
#define PIX_FMT_BW #define PIX_FMT_BW

View File

@ -24,9 +24,6 @@
/* Device supports an optional GPS chip */ /* Device supports an optional GPS chip */
#define HAS_GPS #define HAS_GPS
/* Screen has adjustable contrast */
#define SCREEN_CONTRAST
/* Supported radio bands */ /* Supported radio bands */
#define BAND_VHF #define BAND_VHF
#define BAND_UHF #define BAND_UHF