comparison Discovery/Src/t3.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 74a8296a2318
children 39c147e47c1c
comparison
equal deleted inserted replaced
383:49a02dea8ae3 384:427ae9f8e28e
56 56
57 /* TEM HAS TO MOVE TO GLOBAL--------------------------------------------------*/ 57 /* TEM HAS TO MOVE TO GLOBAL--------------------------------------------------*/
58 58
59 /* Private types -------------------------------------------------------------*/ 59 /* Private types -------------------------------------------------------------*/
60 #define TEXTSIZE 16 60 #define TEXTSIZE 16
61 #define NUMBER_OF_VIEWS 7 /* number of views defined in the array below */
61 62
62 const uint8_t t3_customviewsStandard[] = 63 const uint8_t t3_customviewsStandard[] =
63 { 64 {
64 CVIEW_T3_Decostop, 65 CVIEW_T3_Decostop,
65 CVIEW_sensors, 66 CVIEW_sensors,
1249 center.y = 116; 1250 center.y = 116;
1250 GFX_draw_circle(tXscreen, center, 106, CLUT_Font030); 1251 GFX_draw_circle(tXscreen, center, 106, CLUT_Font030);
1251 GFX_draw_circle(tXscreen, center, 107, CLUT_Font030); 1252 GFX_draw_circle(tXscreen, center, 107, CLUT_Font030);
1252 GFX_draw_circle(tXscreen, center, 108, CLUT_Font030); 1253 GFX_draw_circle(tXscreen, center, 108, CLUT_Font030);
1253 } 1254 }
1255
1256 uint8_t t3_GetEnabled_customviews()
1257 {
1258 int8_t i;
1259 uint8_t enabledViewCnt = 0;
1260 uint32_t cv_config = settingsGetPointer()->cv_configuration;
1261
1262 i=0;
1263 do
1264 {
1265 if(cv_changelist[i] == CVIEW_sensors) /* at the moment specific big font view may not be selected. Only sensor setting is taken from t7 configuration */
1266 {
1267 if(!CHECK_BIT_THOME(cv_config, cv_changelist[i]))
1268 {
1269 enabledViewCnt = NUMBER_OF_VIEWS - 1; /* sensor shall not be displayed */
1270 }
1271 else
1272 {
1273 enabledViewCnt = NUMBER_OF_VIEWS; /* enable all possible views */
1274 }
1275 break;
1276 }
1277 i++;
1278 } while(cv_changelist[i] != CVIEW_END);
1279 if ((stateUsed->diveSettings.ppo2sensors_deactivated) || (stateUsed->diveSettings.ccrOption == 0))
1280 {
1281 enabledViewCnt = NUMBER_OF_VIEWS - 1; /* sensor shall not be displayed */
1282 }
1283
1284 return enabledViewCnt;
1285 }
1286
1287