comparison Discovery/Src/t9.c @ 130:b7689d9e888a FlipDisplay

Minor changes to improved code quality and to eliminate warnings
author Ideenmodellierer
date Sun, 17 Feb 2019 21:22:13 +0100
parents b364c75005bb
children
comparison
equal deleted inserted replaced
129:239aa58b533d 130:b7689d9e888a
103 uint32_t height; 103 uint32_t height;
104 } S9Background; 104 } S9Background;
105 105
106 S9Background t9_background = 106 S9Background t9_background =
107 { 107 {
108 .pointer = NULL, 108 .pointer = 0,
109 }; 109 };
110 110
111 /* Private types -------------------------------------------------------------*/ 111 /* Private types -------------------------------------------------------------*/
112 const uint8_t t9_customviewsDiveStandard[] = 112 const uint8_t t9_customviewsDiveStandard[] =
113 { 113 {
565 void t9_change_customview(void) 565 void t9_change_customview(void)
566 { 566 {
567 const uint8_t *pViews; 567 const uint8_t *pViews;
568 568
569 if(stateUsed->mode == MODE_DIVE) 569 if(stateUsed->mode == MODE_DIVE)
570 {
570 pViews = t9_customviewsDive; 571 pViews = t9_customviewsDive;
571 572 while((*pViews != CVIEW_END) && (*pViews != t9_selection_customview))
572 while((*pViews != CVIEW_END) && (*pViews != t9_selection_customview)) 573 {pViews++;}
573 {pViews++;} 574
574 575 if(*pViews < CVIEW_END)
575 if(*pViews < CVIEW_END) 576 pViews++;
576 pViews++; 577 else
577 else 578 {
578 { 579 if(stateUsed->mode == MODE_DIVE)
579 if(stateUsed->mode == MODE_DIVE) 580 pViews = t9_customviewsDive;
580 pViews = t9_customviewsDive; 581 }
581 } 582 t9_selection_customview = *pViews;
582 583 }
584 else
585 {
586 t9_selection_customview = 0;
587 }
583 // if((*pViews == CVIEW_Scooter) && (getLicence() != LICENCEBONEX)) 588 // if((*pViews == CVIEW_Scooter) && (getLicence() != LICENCEBONEX))
584 // pViews++; 589 // pViews++;
585 590
586 t9_selection_customview = *pViews; 591
587 } 592 }
588 593
589 594
590 uint8_t t9_get_length_of_customtext(void) 595 uint8_t t9_get_length_of_customtext(void)
591 { 596 {