comparison Discovery/Src/t7.c @ 446:f1257a32f2d4 minor_improvments

Introduced configuration header for variant managment: At the moment several defines are distributed across the code allowing special SW builds (e.g. logging simulated dives). To make these options more transparent and easier to configurate a separate header has been added. With this header an new option for an optical pressure sensor was introduced.
author ideenmodellierer
date Thu, 05 Mar 2020 22:31:50 +0100
parents adb18fe92737
children f7c66593ab82
comparison
equal deleted inserted replaced
445:ee1434824c3f 446:f1257a32f2d4
2650 /* actual GF */ 2650 /* actual GF */
2651 case LLC_GF: 2651 case LLC_GF:
2652 headerText[2] = TXT_ActualGradient; 2652 headerText[2] = TXT_ActualGradient;
2653 snprintf(text,TEXTSIZE,"\020%.0f\016\016%%\017",100 * pDecoinfoStandard->super_saturation); 2653 snprintf(text,TEXTSIZE,"\020%.0f\016\016%%\017",100 * pDecoinfoStandard->super_saturation);
2654 break; 2654 break;
2655 #ifdef ENABLE_BOTTLE_SENSOR
2655 case LCC_BottleBar: 2656 case LCC_BottleBar:
2656 headerText[2] = TXT_AtemGasVorrat; 2657 headerText[2] = TXT_AtemGasVorrat;
2657 tinyHeaderFont = 1; 2658 tinyHeaderFont = 1;
2658 snprintf(text,TEXTSIZE,"%d\016\016\017", stateUsed->lifeData.bottle_bar[1]); 2659 snprintf(text,TEXTSIZE,"%d\016\016\017", stateUsed->lifeData.bottle_bar[1]);
2659 break; 2660 break;
2661 #endif
2660 } 2662 }
2661 headerText[3] = 0; 2663 headerText[3] = 0;
2662 2664
2663 if(tinyHeaderFont) 2665 if(tinyHeaderFont)
2664 GFX_write_string(&FontT24,&t7l3,headerText,0); 2666 GFX_write_string(&FontT24,&t7l3,headerText,0);
2665 else 2667 else
2666 GFX_write_string(&FontT42,&t7l3,headerText,0); 2668 GFX_write_string(&FontT42,&t7l3,headerText,0);
2667 2669
2668 t7_colorscheme_mod(text); 2670 t7_colorscheme_mod(text);
2669 if(selection_custom_field != LCC_BottleBar) 2671 #ifndef ENABLE_BOTTLE_SENSOR
2672 GFX_write_string(&FontT105,&t7l3,text,line);
2673 #else
2674 if(selection_custom_field != LCC_BottleBar) /* a changing color set is used for bar display */
2670 { 2675 {
2671 GFX_write_string(&FontT105,&t7l3,text,line); 2676 GFX_write_string(&FontT105,&t7l3,text,line);
2672 } 2677 }
2673 else 2678 else
2674 { 2679 {
2687 agedColor = 0; 2692 agedColor = 0;
2688 } 2693 }
2689 2694
2690 GFX_write_string_color(&FontT105,&t7l3,text,line,agedColor); 2695 GFX_write_string_color(&FontT105,&t7l3,text,line,agedColor);
2691 } 2696 }
2697 #endif
2692 } 2698 }
2693 2699
2694 /* Private functions ---------------------------------------------------------*/ 2700 /* Private functions ---------------------------------------------------------*/
2695 2701
2696 uint8_t t7_customtextPrepare(char * text) 2702 uint8_t t7_customtextPrepare(char * text)