diff Discovery/Src/tMenuEditCustom.c @ 640:f735f1123526

Development bugfix Viewport settings: Settings of the viewport have been reset after every update. Root cause: plausibility check value has not been adapted to latest implementation. In addition settings for frame have been overwritten while focus was changed because of an invalid and combination. Both issues have been solved
author Ideenmodellierer
date Thu, 11 Mar 2021 21:43:43 +0100
parents b9d4baa4f6fa
children 3ccf13af4651
line wrap: on
line diff
--- a/Discovery/Src/tMenuEditCustom.c	Thu Feb 25 12:20:43 2021 +0100
+++ b/Discovery/Src/tMenuEditCustom.c	Thu Mar 11 21:43:43 2021 +0100
@@ -709,9 +709,9 @@
 uint8_t OnAction_CViewPortLayout(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action)
 {
 	SSettings* pSettings = settingsGetPointer();
-	if(pSettings->viewPortMode >> 4 != 0)
+	if((pSettings->viewPortMode >> 4) & 0x10 != 0)
 	{
-		pSettings->viewPortMode &= 0x0F;
+		pSettings->viewPortMode &= 0xEF;	/* 1110 1111 */
 	}
 	else
 	{
@@ -772,7 +772,7 @@
     {
     	newValue = 0;
     }
-    pSettings->viewPortMode &= 0x9F;
+    pSettings->viewPortMode &= 0x9F;		/* 1001 1111 */
     pSettings->viewPortMode |= (newValue << 5);
     return UPDATE_DIVESETTINGS;
 }