comparison Discovery/Src/t3.c @ 622:8f78faf88fc5

Adjustments for flipped display view: After some testing the t3_profile implementation in flipped mode some changes in the visualization were necessary to get a correct view.
author Ideenmodellierer
date Wed, 03 Feb 2021 21:45:48 +0100
parents 8fa2de4414a8
children 930f1bbe0ac2
comparison
equal deleted inserted replaced
621:6826731ff2be 622:8f78faf88fc5
201 && (window->left >= 0) 201 && (window->left >= 0)
202 && (window->bottom > window->top) 202 && (window->bottom > window->top)
203 && (window->right > window->left)) 203 && (window->right > window->left))
204 { 204 {
205 windowWidth = window->right - window->left; 205 windowWidth = window->right - window->left;
206 if(settingsGetPointer()->FlipDisplay) 206
207 { 207 if(!settingsGetPointer()->FlipDisplay)
208 start.y = window->bottom; 208 {
209 stop.y = window->top; 209 start.y = 479 - BigFontSeperationTopBottom + 5;
210 } 210 stop.y = 479 - 5;
211 else 211 }
212 { 212 else
213 start.y = 479 - window->bottom; 213 {
214 stop.y = 479 - window->top; 214 start.y = 479 - BigFontSeperationTopBottom - 5;
215 } 215 stop.y =5;
216 216 }
217 while((line <= windowWidth) && (dataIndex < datalength)) 217 while((line <= windowWidth) && (dataIndex < datalength))
218 { 218 {
219 factor = (10 * line * (long)datalength)/windowWidth; 219 factor = (10 * line * (long)datalength)/windowWidth;
220 dataIndex = factor/10; 220 dataIndex = factor/10;
221 /* check if a marker is set in the intervall which is bypassed because of data reduction */ 221 /* check if a marker is set in the intervall which is bypassed because of data reduction */
259 uint8_t* pReplayMarker; 259 uint8_t* pReplayMarker;
260 uint16_t max_depth = 10; 260 uint16_t max_depth = 10;
261 char text[TEXTSIZE]; 261 char text[TEXTSIZE];
262 point_t start, stop; 262 point_t start, stop;
263 uint16_t diveMinutes = 0; 263 uint16_t diveMinutes = 0;
264
265 const SDecoinfo * pDecoinfo; 264 const SDecoinfo * pDecoinfo;
266 265
266 SSettings* pSettings;
267 pSettings = settingsGetPointer();
268
267 if(stateUsed->diveSettings.deco_type.ub.standard == GF_MODE) 269 if(stateUsed->diveSettings.deco_type.ub.standard == GF_MODE)
268 { 270 {
269 pDecoinfo = &stateUsed->decolistBuehlmann; 271 pDecoinfo = &stateUsed->decolistBuehlmann;
270 } 272 }
271 else 273 else
272 { 274 {
273 pDecoinfo = &stateUsed->decolistVPM; 275 pDecoinfo = &stateUsed->decolistVPM;
274 } 276 }
275 277
276 wintemp.left = t3c1.WindowX0; 278 wintemp.top = 479 - BigFontSeperationTopBottom + 5;
277 wintemp.right = t3c1.WindowX0 + CV_PROFILE_WIDTH;
278 wintemp.top = 480 - BigFontSeperationTopBottom + 5;
279 wintemp.bottom = 479 - 5; 279 wintemp.bottom = 479 - 5;
280 280
281 if(!pSettings->FlipDisplay)
282 {
283 wintemp.left = t3c1.WindowX0;
284 wintemp.right = t3c1.WindowX0 + CV_PROFILE_WIDTH;
285 }
286 else
287 {
288 wintemp.left = t3c1.WindowX1 - CV_PROFILE_WIDTH;;
289 wintemp.right = t3c1.WindowX1;
290 }
291
281 start.x = CV_PROFILE_WIDTH + 2; 292 start.x = CV_PROFILE_WIDTH + 2;
282 start.y = t3c1.WindowY0;
283 stop.x = start.x; 293 stop.x = start.x;
284 stop.y = t3c1.WindowY1; 294 start.y = 479 - BigFontSeperationTopBottom - 5;
295 stop.y =5;
285 296
286 GFX_draw_line(&t3screen, start, stop, CLUT_Font020); 297 GFX_draw_line(&t3screen, start, stop, CLUT_Font020);
287 298
288 if(getReplayOffset() != 0xFFFF) 299 if(getReplayOffset() != 0xFFFF)
289 { 300 {