comparison Discovery/Src/t7.c @ 502:cf06c12c06d1

Bugfix display of disabled screen. It is possible to select a screen as default which is in parallel disabled in the selection view. To avoid this the enable / disable state is not also checked when entering dive mode. The check function was depending on an ACTION. The functionality has been changed to allow the function call without ACTION.
author Ideenmodellierer
date Mon, 24 Aug 2020 19:43:13 +0200
parents 89f6857276f8
children 0004704906d0
comparison
equal deleted inserted replaced
501:2ffee0811ad9 502:cf06c12c06d1
573 if((settingsGetPointer()->tX_customViewTimeout == 0) && (settingsGetPointer()->showDebugInfo)) 573 if((settingsGetPointer()->tX_customViewTimeout == 0) && (settingsGetPointer()->showDebugInfo))
574 selection_customview = CVIEW_noneOrDebug; 574 selection_customview = CVIEW_noneOrDebug;
575 else 575 else
576 selection_customview = settingsGetPointer()->tX_customViewPrimary; 576 selection_customview = settingsGetPointer()->tX_customViewPrimary;
577 577
578 t7_change_customview(ACTION_END);
578 InitMotionDetection(); 579 InitMotionDetection();
579 } 580 }
580 581
581 if(status.page == PageSurface) 582 if(status.page == PageSurface)
582 set_globalState(StD); 583 set_globalState(StD);
1580 pViews++; 1581 pViews++;
1581 } 1582 }
1582 pLastView = pViews; 1583 pLastView = pViews;
1583 pViews = pCurView; 1584 pViews = pCurView;
1584 1585
1585 if((action == ACTION_BUTTON_ENTER) || (action == ACTION_PITCH_POS)) 1586 do
1586 { 1587 {
1587 if(*pViews < CVIEW_END) 1588 switch(action)
1588 pViews++;
1589
1590 if(*pViews == CVIEW_END)
1591 { 1589 {
1592 pViews = pStartView; 1590 case ACTION_BUTTON_ENTER:
1593 } 1591 case ACTION_PITCH_POS:
1594 } 1592 if(*pViews != CVIEW_T3_END)
1595 else 1593 pViews++;
1596 { 1594 if(*pViews == CVIEW_T3_END)
1597 if(pViews == pStartView)
1598 {
1599 pViews = pLastView - 1;
1600 }
1601 else
1602 {
1603 pViews--;
1604 }
1605 }
1606
1607 do
1608 {
1609 cv_disabled = t7_customview_disabled(*pViews);
1610 if(cv_disabled) /* view is disabled => jump to next view */
1611 {
1612 if((action == ACTION_BUTTON_ENTER) || (action == ACTION_PITCH_POS))
1613 {
1614 pViews++;
1615 if(*pViews == CVIEW_END)
1616 { 1595 {
1617 pViews = pStartView; 1596 pViews = pStartView;
1618 } 1597 }
1619 } 1598 break;
1620 else 1599 case ACTION_PITCH_NEG:
1621 { 1600 if(pViews == pStartView)
1622 if(pViews == pStartView) 1601 {
1623 { 1602 pViews = pLastView - 1;
1624 pViews = pLastView - 1; 1603 }
1625 } 1604 else
1626 else 1605 {
1627 { 1606 pViews--;
1628 pViews--; 1607 }
1629 } 1608 break;
1630 } 1609 default:
1631 } 1610 break;
1611 }
1612
1613 cv_disabled = t7_customview_disabled(*pViews);
1614 if((cv_disabled) && (action == ACTION_END))
1615 {
1616 action = ACTION_BUTTON_ENTER;
1617 }
1632 } while(cv_disabled); 1618 } while(cv_disabled);
1633 1619
1634 selection_customview = *pViews; 1620 selection_customview = *pViews;
1635 } 1621 }
1636 1622