diff Discovery/Src/motion.c @ 384:427ae9f8e28e MotionDetection

Consider number of available t3 views in sector handling: Before chande the number of sectors were taken from t7 view only causing t3 view to be shown inconsistent in case t7 view count were not 6. => added function to count views.
author ideenmodellierer
date Thu, 17 Oct 2019 23:09:17 +0200
parents 49a02dea8ae3
children 0cd862e501f6
line wrap: on
line diff
--- a/Discovery/Src/motion.c	Thu Oct 17 21:15:42 2019 +0200
+++ b/Discovery/Src/motion.c	Thu Oct 17 23:09:17 2019 +0200
@@ -12,6 +12,7 @@
 #include "motion.h"
 #include "data_central.h"
 #include "t7.h"
+#include "t3.h"
 #include "settings.h"
 
 #define	STABLE_STATE_COUNT			2	/* number of count to declare a state as stable (at the moment based on 100ms) */
@@ -62,7 +63,14 @@
 {
 	if(numOfSectors == CUSTOMER_DEFINED_VIEWS)
 	{
-		sectorDetection.count =  t7_GetEnabled_customviews();
+		if(settingsGetPointer()->design == 3)		/* Big font view ? */
+		{
+			sectorDetection.count =  t3_GetEnabled_customviews();
+		}
+		else
+		{
+			sectorDetection.count =  t7_GetEnabled_customviews();
+		}
 		if(sectorDetection.count > 7)
 		{
 			sectorDetection.count = 7;	/* more views are hard to manually control */