Mercurial > public > ostc4
comparison Discovery/Src/t7.c @ 899:2225c467f1e9 Evo_2_23
Added data path and visualization for position data:
The GNSS data exchange is now initialized and triggered on a cyclic basis (once a second). RTE verion has been increased because of interface change. For now only the position data is shown in a T7 surface views. The functionality may be switched on/off using the compile switch ENABLE_GNSS.
author | Ideenmodellierer |
---|---|
date | Mon, 30 Sep 2024 21:56:05 +0200 |
parents | f29369fff71e |
children | 46a21ff3f5ab |
comparison
equal
deleted
inserted
replaced
898:fac13aa6ba93 | 899:2225c467f1e9 |
---|---|
79 | 79 |
80 uint8_t t7_customtextPrepare(char * text); | 80 uint8_t t7_customtextPrepare(char * text); |
81 | 81 |
82 static void t7_drawAcentGraph(uint8_t color); | 82 static void t7_drawAcentGraph(uint8_t color); |
83 static uint8_t t7_drawSlowExitGraph(void); | 83 static uint8_t t7_drawSlowExitGraph(void); |
84 static void t7_showPosition(void); | |
84 | 85 |
85 /* Imported function prototypes ---------------------------------------------*/ | 86 /* Imported function prototypes ---------------------------------------------*/ |
86 extern uint8_t write_gas(char *text, uint8_t oxygen, uint8_t helium); | 87 extern uint8_t write_gas(char *text, uint8_t oxygen, uint8_t helium); |
87 | 88 |
88 /* Exported variables --------------------------------------------------------*/ | 89 /* Exported variables --------------------------------------------------------*/ |
141 CVIEW_Gaslist, | 142 CVIEW_Gaslist, |
142 CVIEW_sensors_mV, | 143 CVIEW_sensors_mV, |
143 CVIEW_Charger, | 144 CVIEW_Charger, |
144 CVIEW_CcrSummary, | 145 CVIEW_CcrSummary, |
145 CVIEW_Timer, | 146 CVIEW_Timer, |
147 #ifdef ENABLE_GNSS | |
148 CVIEW_Position, | |
149 #endif | |
146 CVIEW_END | 150 CVIEW_END |
147 }; | 151 }; |
148 | 152 |
149 | 153 |
150 static uint8_t selection_custom_field = LLC_Temperature; | 154 static uint8_t selection_custom_field = LLC_Temperature; |
2682 GFX_write_string(&FontT42, &t7cY0free, text, 1); | 2686 GFX_write_string(&FontT42, &t7cY0free, text, 1); |
2683 break; | 2687 break; |
2684 case CVIEW_CcrSummary: | 2688 case CVIEW_CcrSummary: |
2685 snprintf(text, 100, "\032\f\001%c%c", TXT_2BYTE, TXT2BYTE_CcrSummary); | 2689 snprintf(text, 100, "\032\f\001%c%c", TXT_2BYTE, TXT2BYTE_CcrSummary); |
2686 GFX_write_string(&FontT42, &t7cH, text, 0); | 2690 GFX_write_string(&FontT42, &t7cH, text, 0); |
2687 | |
2688 t7_CcrSummary(pSettings); | 2691 t7_CcrSummary(pSettings); |
2689 | |
2690 break; | 2692 break; |
2691 case CVIEW_Timer: | 2693 case CVIEW_Timer: |
2692 snprintf(text, 100, "\032\f\001%c%c", TXT_2BYTE, TXT2BYTE_Timer); | 2694 snprintf(text, 100, "\032\f\001%c%c", TXT_2BYTE, TXT2BYTE_Timer); |
2693 GFX_write_string(&FontT42, &t7cH, text, 0); | 2695 GFX_write_string(&FontT42, &t7cH, text, 0); |
2694 | 2696 |
2697 updateTimer(pSettings, nowS, last_customview != CVIEW_Timer); | 2699 updateTimer(pSettings, nowS, last_customview != CVIEW_Timer); |
2698 | 2700 |
2699 showTimer(pSettings, nowS); | 2701 showTimer(pSettings, nowS); |
2700 | 2702 |
2701 break; | 2703 break; |
2704 | |
2705 case CVIEW_Position: | |
2706 snprintf(text, 100, "\032\f\001%c%c", TXT_2BYTE, TXT2BYTE_Position); | |
2707 GFX_write_string(&FontT42, &t7cH, text, 0); | |
2708 t7_showPosition(); | |
2702 } | 2709 } |
2703 | 2710 |
2704 last_customview = selection_customview; | 2711 last_customview = selection_customview; |
2705 } | 2712 } |
2706 | 2713 |
3979 ,stateUsed->lifeData.counterSecondsShallowDepth); | 3986 ,stateUsed->lifeData.counterSecondsShallowDepth); |
3980 GFX_write_string(&FontT42, &t7cY0free, text, 1); | 3987 GFX_write_string(&FontT42, &t7cY0free, text, 1); |
3981 #endif | 3988 #endif |
3982 } | 3989 } |
3983 | 3990 |
3984 | 3991 void t7_showPosition(void) |
3992 { | |
3993 char text[256+50]; | |
3994 uint8_t textpointer = 0; | |
3995 | |
3996 t7cY0free.WindowLineSpacing = 28 + 48 + 14; | |
3997 t7cY0free.WindowY0 = t7cH.WindowY0 - 5 - 2 * t7cY0free.WindowLineSpacing; | |
3998 t7cY0free.WindowNumberOfTextLines = 3; | |
3999 | |
4000 textpointer += snprintf(&text[textpointer],50,"\001Longitude\n\r"); | |
4001 textpointer += snprintf(&text[textpointer],50,"\001Latitude\n\r"); | |
4002 GFX_write_string(&FontT24, &t7cY0free, text, 1); | |
4003 | |
4004 t7cY0free.WindowY0 -= 52; | |
4005 snprintf(text,60, | |
4006 "\001%0.5f\n\r" | |
4007 "\001%0.5f\n\r" | |
4008 ,stateUsed->lifeData.gnssPosition.Longitude | |
4009 ,stateUsed->lifeData.gnssPosition.Latitude ); | |
4010 | |
4011 GFX_write_string(&FontT42, &t7cY0free, text, 1); | |
4012 } | |
3985 void t7_SummaryOfLeftCorner(void) | 4013 void t7_SummaryOfLeftCorner(void) |
3986 { | 4014 { |
3987 char text[256+60]; | 4015 char text[256+60]; |
3988 uint8_t textpointer = 0; | 4016 uint8_t textpointer = 0; |
3989 SSettings* pSettings = settingsGetPointer(); | 4017 SSettings* pSettings = settingsGetPointer(); |