Mercurial > public > ostc4
comparison Discovery/Src/t7.c @ 962:3d8c22c1f9e2 Evo_2_23
Position view for flipped mode:
the position view was not displayed correct in flipped mode. This problem has been fixed in the new version by adaptation of the window parameters
author | Ideenmodellierer |
---|---|
date | Sun, 12 Jan 2025 19:17:17 +0100 |
parents | 9b29995d6619 |
children |
comparison
equal
deleted
inserted
replaced
961:2130d771c8db | 962:3d8c22c1f9e2 |
---|---|
4039 char text[256+50]; | 4039 char text[256+50]; |
4040 uint8_t textpointer = 0; | 4040 uint8_t textpointer = 0; |
4041 point_t start, stop; | 4041 point_t start, stop; |
4042 uint8_t index = 0; | 4042 uint8_t index = 0; |
4043 uint8_t color = 0; | 4043 uint8_t color = 0; |
4044 SSettings* pSettings = settingsGetPointer(); | |
4044 | 4045 |
4045 t7cY0free.WindowLineSpacing = 28 + 48 + 14; | 4046 t7cY0free.WindowLineSpacing = 28 + 48 + 14; |
4046 t7cY0free.WindowY0 = t7cH.WindowY0 - 5 - 2 * t7cY0free.WindowLineSpacing; | 4047 t7cY0free.WindowY0 = t7cH.WindowY0 - 5 - 2 * t7cY0free.WindowLineSpacing; |
4047 t7cY0free.WindowNumberOfTextLines = 3; | 4048 t7cY0free.WindowNumberOfTextLines = 3; |
4048 t7cY0free.WindowY0 -= 20; | 4049 t7cY0free.WindowY0 -= 20; |
4050 | |
4051 t7cY0free.WindowX0 = CUSTOMBOX_LINE_LEFT + CUSTOMBOX_INSIDE_OFFSET; | |
4052 t7cY0free.WindowX1 = CUSTOMBOX_LINE_RIGHT - CUSTOMBOX_INSIDE_OFFSET; | |
4053 | |
4054 if(pSettings->FlipDisplay) | |
4055 { | |
4056 t7cY0free.WindowY0 = t7cH.WindowY0 + 15; | |
4057 t7cY0free.WindowY1 = t7cY0free.WindowY0 + 250; | |
4058 } | |
4059 | |
4049 if(stateUsed->lifeData.gnssData.fixType < 2) | 4060 if(stateUsed->lifeData.gnssData.fixType < 2) |
4050 { | 4061 { |
4051 textpointer += snprintf(&text[textpointer],50,"\001Satellites\n\r"); | 4062 textpointer += snprintf(&text[textpointer],50,"\001Satellites\n\r"); |
4052 if(stateUsed->lifeData.gnssData.alive & GNSS_ALIVE_STATE_ALIVE) | 4063 if(stateUsed->lifeData.gnssData.alive & GNSS_ALIVE_STATE_ALIVE) |
4053 { | 4064 { |
4063 textpointer += snprintf(&text[textpointer],50,"\001Longitude\n\r"); | 4074 textpointer += snprintf(&text[textpointer],50,"\001Longitude\n\r"); |
4064 textpointer += snprintf(&text[textpointer],50,"\001Latitude\n\r"); | 4075 textpointer += snprintf(&text[textpointer],50,"\001Latitude\n\r"); |
4065 } | 4076 } |
4066 GFX_write_string(&FontT24, &t7cY0free, text, 1); | 4077 GFX_write_string(&FontT24, &t7cY0free, text, 1); |
4067 | 4078 |
4068 t7cY0free.WindowY0 -= 52; | 4079 if(!pSettings->FlipDisplay) |
4080 { | |
4081 t7cY0free.WindowY0 -= 52; | |
4082 } | |
4083 else | |
4084 { | |
4085 t7cY0free.WindowY1 = 370; | |
4086 } | |
4087 | |
4069 if(stateUsed->lifeData.gnssData.fixType < 2) | 4088 if(stateUsed->lifeData.gnssData.fixType < 2) |
4070 { | 4089 { |
4071 snprintf(text,60,"\001%d\n\r",stateUsed->lifeData.gnssData.numSat); | 4090 snprintf(text,60,"\001%d\n\r",stateUsed->lifeData.gnssData.numSat); |
4072 } | 4091 } |
4073 else | 4092 else |
4079 } | 4098 } |
4080 GFX_write_string(&FontT42, &t7cY0free, text, 1); | 4099 GFX_write_string(&FontT42, &t7cY0free, text, 1); |
4081 | 4100 |
4082 if(stateUsed->lifeData.gnssData.fixType < 2) /* draw status bars */ | 4101 if(stateUsed->lifeData.gnssData.fixType < 2) /* draw status bars */ |
4083 { | 4102 { |
4084 start.x = t7cY0free.WindowX0 + 85; | 4103 if(!pSettings->FlipDisplay) |
4085 stop.x = start.x; | 4104 { |
4086 start.y = t7cY0free.WindowY0 + 75; | 4105 start.x = t7cY0free.WindowX0 + 85; |
4087 stop.y = start.y + 20; | 4106 stop.x = start.x; |
4107 start.y = t7cY0free.WindowY0 + 75; | |
4108 stop.y = start.y + 20; | |
4109 } | |
4110 else | |
4111 { | |
4112 start.x = t7cY0free.WindowX0 - 50; | |
4113 stop.x = start.x; | |
4114 start.y = t7cY0free.WindowY0 - 75; | |
4115 stop.y = start.y - 20; | |
4116 } | |
4117 | |
4088 while((index < stateUsed->lifeData.gnssData.numSat) && (index < 4)) | 4118 while((index < stateUsed->lifeData.gnssData.numSat) && (index < 4)) |
4089 { | 4119 { |
4090 if(stateUsed->lifeData.gnssData.signalQual[index] > 4) color = CLUT_NiceGreen; | 4120 if(stateUsed->lifeData.gnssData.signalQual[index] > 4) color = CLUT_NiceGreen; |
4091 if((stateUsed->lifeData.gnssData.signalQual[index] > 2) && (stateUsed->lifeData.gnssData.signalQual[index] <= 4)) color = CLUT_WarningYellow; | 4121 if((stateUsed->lifeData.gnssData.signalQual[index] > 2) && (stateUsed->lifeData.gnssData.signalQual[index] <= 4)) color = CLUT_WarningYellow; |
4092 if(stateUsed->lifeData.gnssData.signalQual[index] <= 2) color = CLUT_WarningRed; | 4122 if(stateUsed->lifeData.gnssData.signalQual[index] <= 2) color = CLUT_WarningRed; |
4710 { | 4740 { |
4711 t7cY0free.WindowY0 -= 52; | 4741 t7cY0free.WindowY0 -= 52; |
4712 } | 4742 } |
4713 else | 4743 else |
4714 { | 4744 { |
4715 t7cY0free.WindowY1 += 52; | 4745 t7cY0free.WindowY1 += 52; |
4716 } | 4746 } |
4717 | 4747 |
4718 if((stateUsed->lifeData.battery_charge > 0) && (stateUsed->chargeStatus != CHARGER_off)) | 4748 if((stateUsed->lifeData.battery_charge > 0) && (stateUsed->chargeStatus != CHARGER_off)) |
4719 { | 4749 { |
4720 snprintf(text,60, | 4750 snprintf(text,60, |