Mercurial > public > ostc4
changeset 111:38785aa95837 FlipDisplay
Added new nvm parameter"FlipDisplay" indicating the screen orientation
author | Ideenmodellierer |
---|---|
date | Tue, 01 Jan 2019 21:03:10 +0100 (2019-01-01) |
parents | cc8e24374b83 |
children | fdf0272e9213 |
files | Discovery/Src/settings.c |
diffstat | 1 files changed, 11 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/Discovery/Src/settings.c Tue Jan 01 21:02:17 2019 +0100 +++ b/Discovery/Src/settings.c Tue Jan 01 21:03:10 2019 +0100 @@ -55,7 +55,7 @@ { .versionFirst = 1, .versionSecond = 4, - .versionThird = 0, + .versionThird = 3, .versionBeta = 0, /* 4 bytes with trailing 0 */ @@ -82,7 +82,7 @@ * There might even be entries with fixed values that have no range */ const SSettings SettingsStandard = { - .header = 0xFFFF0017, + .header = 0xFFFF0018, .warning_blink_dsec = 8 * 2, .lastDiveLogId = 0, .logFlashNextSampleStartAddress = 0, @@ -305,6 +305,7 @@ .FactoryButtonBalance[0] = 3, .FactoryButtonBalance[1] = 3, .FactoryButtonBalance[2] = 3, + .FlipDisplay = 0, }; /* Private function prototypes -----------------------------------------------*/ @@ -442,6 +443,9 @@ pSettings->FactoryButtonBalance[1] = pStandard->FactoryButtonBalance[1]; pSettings->FactoryButtonBalance[2] = pStandard->FactoryButtonBalance[2]; // no break + case 0xFFFF0017: + pSettings->FlipDisplay = 0; + // no break default: pSettings->header = pStandard->header; break; // no break before!! @@ -1381,6 +1385,11 @@ corrections++; } + if(Settings.FlipDisplay > 1) /* only boolean values allowed */ + { + Settings.FlipDisplay = 0; + corrections++; + } if(corrections > 255) return 255;