Mercurial > public > ostc4
comparison Discovery/Src/tMenuEditPlanner.c @ 696:cc542448fb28
Merge
author | heinrichsweikamp |
---|---|
date | Fri, 19 Aug 2022 11:30:24 +0200 |
parents | 52df13712fa3 |
children | 01f40cb1057e |
comparison
equal
deleted
inserted
replaced
661:87bee7cc77b3 | 696:cc542448fb28 |
---|---|
305 write_label_var( 20, 800, y_line, &FontT48, text); | 305 write_label_var( 20, 800, y_line, &FontT48, text); |
306 | 306 |
307 strncpy(text, | 307 strncpy(text, |
308 " " | 308 " " |
309 "\016\016" | 309 "\016\016" |
310 " l\\min" | 310 " l/min" |
311 "\017" | 311 "\017" |
312 " " | 312 " " |
313 "\016\016" | 313 "\016\016" |
314 " deco" | 314 " deco" |
315 "\017" | 315 "\017" |
316 " " | 316 " " |
317 "\016\016" | 317 "\016\016" |
318 " l\\min" | 318 " l/min" |
319 "\017", | 319 "\017", |
320 40 | 320 40 |
321 ); | 321 ); |
322 write_label_var( 400, 800, y_line, &FontT48, text); | 322 write_label_var( 400, 800, y_line, &FontT48, text); |
323 | 323 |
324 write_field_udigit(StMPLAN4_Settings, 400, 800, y_line, &FontT48, "## ##", (uint32_t)travel_lbar, (uint32_t)deco_lbar, 0, 0); | 324 write_field_udigit(StMPLAN4_Settings, 400, 800, y_line, &FontT48, "## ##", (uint32_t)travel_lbar, (uint32_t)deco_lbar, 0, 0); |
325 // write_field_udigit(StMPLAN4_Settings, 400, 800, y_line, &FontT48, "##\016\016 l\\min\017 \016\016deco\017 ##\016\016 l\\min\017", (uint32_t)travel_lbar, (uint32_t)deco_lbar, 0, 0); | |
326 // note : text max is 32 byte! -> ok and it does not like small fonts in between -> problem | 325 // note : text max is 32 byte! -> ok and it does not like small fonts in between -> problem |
327 write_buttonTextline(TXT2BYTE_ButtonMinus,TXT2BYTE_ButtonEnter,TXT2BYTE_ButtonPlus); | 326 write_buttonTextline(TXT2BYTE_ButtonMinus,TXT2BYTE_ButtonEnter,TXT2BYTE_ButtonPlus); |
328 | 327 |
329 setEvent(StMPLAN4_Settings, (uint32_t)OnAction_PlanSettings); | 328 setEvent(StMPLAN4_Settings, (uint32_t)OnAction_PlanSettings); |
330 startEdit(); | 329 startEdit(); |
331 | |
332 /* | |
333 text[textPointer++] = TXT_2BYTE; | |
334 text[textPointer++] = TXT2BYTE_SimConsumption; | |
335 text[textPointer++] = '\t'; | |
336 textPointer += snprintf(&text[textPointer],30, | |
337 "%u" | |
338 "\016\016 l\\min\017" | |
339 ,tMplan_gasConsumTravel); | |
340 text[textPointer++] = ' '; | |
341 text[textPointer++] = ' '; | |
342 textPointer += snprintf(&text[textPointer],30, | |
343 "\016\016deco\017" | |
344 " %u" | |
345 "\016\016 l\\min\017" | |
346 ,tMplan_gasConsumDeco); | |
347 */ | |
348 } | 330 } |
349 | 331 |
350 | 332 |
351 uint8_t OnAction_PlanSettings (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) | 333 uint8_t OnAction_PlanSettings (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) |
352 { | 334 { |
620 textpointer = 0; | 602 textpointer = 0; |
621 *text = 0; | 603 *text = 0; |
622 switch(j) | 604 switch(j) |
623 { | 605 { |
624 case 0: // descent | 606 case 0: // descent |
625 textpointer = snprintf(&text[textpointer],20,"-%u\016\016 m\\min\017",tMplan_Summary.descentRateMeterPerMinute); | 607 textpointer = snprintf(&text[textpointer],20,"-%u\016\016 m/min\017",tMplan_Summary.descentRateMeterPerMinute); |
626 break; | 608 break; |
627 case 1: // level | 609 case 1: // level |
628 textpointer = snprintf(&text[textpointer],20,"%1.2f\016\016 %c\017",tMplan_Summary.ppO2AtBottom, TXT_ppO2); | 610 textpointer = snprintf(&text[textpointer],20,"%1.2f\016\016 %c\017",tMplan_Summary.ppO2AtBottom, TXT_ppO2); |
629 break; | 611 break; |
630 case 2: // first stop | 612 case 2: // first stop |
631 case 3: // surface | 613 case 3: // surface |
632 textpointer = snprintf(&text[textpointer],20,"%u\016\016 m\\min\017",tMplan_Summary.ascentRateMeterPerMinute); | 614 textpointer = snprintf(&text[textpointer],20,"%u\016\016 m/min\017",tMplan_Summary.ascentRateMeterPerMinute); |
633 break; | 615 break; |
634 default: | 616 default: |
635 break; | 617 break; |
636 } | 618 } |
637 text[textpointer] = 0; | 619 text[textpointer] = 0; |
687 textpointer += snprintf(&text[textpointer],20,"VPM +%u",stateUsed->diveSettings.vpm_conservatism); | 669 textpointer += snprintf(&text[textpointer],20,"VPM +%u",stateUsed->diveSettings.vpm_conservatism); |
688 else | 670 else |
689 textpointer += snprintf(&text[textpointer],20,"GF %u/%u", stateUsed->diveSettings.gf_low, stateUsed->diveSettings.gf_high); | 671 textpointer += snprintf(&text[textpointer],20,"GF %u/%u", stateUsed->diveSettings.gf_low, stateUsed->diveSettings.gf_high); |
690 break; | 672 break; |
691 case 1: | 673 case 1: |
692 if(settingsGetPointer()->dive_mode == DIVEMODE_CCR) | 674 if(isLoopMode(settingsGetPointer()->dive_mode)) |
693 text[textpointer++] = 'C'; | 675 text[textpointer++] = 'C'; |
694 else | 676 else |
695 text[textpointer++] = 'O'; | 677 text[textpointer++] = 'O'; |
696 text[textpointer++] = 'C'; | 678 text[textpointer++] = 'C'; |
697 text[textpointer++] = ','; | 679 text[textpointer++] = ','; |