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
#define SETTINGS_H
#include <hwconfig.h>
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 */

View File

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

View File

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

View File

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

View File

@ -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