Mercurial > public > ostc4
comparison Discovery/Src/t3.c @ 138:cc9c18075e00 FlipDisplay
Removed no longer supported scooter code
author | Ideenmodellierer |
---|---|
date | Sat, 23 Feb 2019 21:10:51 +0100 |
parents | cc8e24374b83 |
children | 255eedad4155 |
comparison
equal
deleted
inserted
replaced
137:9eda5a75c5fd | 138:cc9c18075e00 |
---|---|
74 CVIEW_T3_TTS, | 74 CVIEW_T3_TTS, |
75 CVIEW_T3_ppO2andGas, | 75 CVIEW_T3_ppO2andGas, |
76 CVIEW_T3_END | 76 CVIEW_T3_END |
77 }; | 77 }; |
78 | 78 |
79 const uint8_t t3_customviewsScooter[] = | |
80 { | |
81 CVIEW_Scooter, | |
82 CVIEW_Compass, | |
83 | |
84 CVIEW_T3_Decostop, | |
85 CVIEW_T3_MaxDepth, | |
86 CVIEW_T3_StopWatch, | |
87 CVIEW_T3_TTS, | |
88 CVIEW_T3_ppO2andGas, | |
89 | |
90 CVIEW_T3_END | |
91 }; | |
92 | 79 |
93 const uint8_t *t3_customviews = t3_customviewsStandard; | 80 const uint8_t *t3_customviews = t3_customviewsStandard; |
94 | 81 |
95 /* Private function prototypes -----------------------------------------------*/ | 82 /* Private function prototypes -----------------------------------------------*/ |
96 void t3_refresh_divemode(void); | 83 void t3_refresh_divemode(void); |
103 | 90 |
104 void t3_init(void) | 91 void t3_init(void) |
105 { | 92 { |
106 SSettings* pSettings; | 93 SSettings* pSettings; |
107 pSettings = settingsGetPointer(); | 94 pSettings = settingsGetPointer(); |
108 | |
109 if(getLicence() == LICENCEBONEX) | |
110 { | |
111 t3_customviews = t3_customviewsScooter; | |
112 } | |
113 | 95 |
114 t3_selection_customview = t3_customviews[0]; | 96 t3_selection_customview = t3_customviews[0]; |
115 | 97 |
116 t3screen.FBStartAdress = 0; | 98 t3screen.FBStartAdress = 0; |
117 t3screen.ImageHeight = 480; | 99 t3screen.ImageHeight = 480; |
522 | 504 |
523 GFX_write_string(&Batt24,tXc1,TextC1,0); | 505 GFX_write_string(&Batt24,tXc1,TextC1,0); |
524 } | 506 } |
525 | 507 |
526 | 508 |
527 void t3_basics_battery_scooter_customview_extra(GFX_DrawCfgWindow* tXc1) | |
528 { | |
529 char TextC1[256]; | |
530 | |
531 TextC1[0] = '\001'; | |
532 TextC1[1] = '\f'; | |
533 TextC1[2] = '\032'; | |
534 TextC1[3] = '3'; | |
535 TextC1[4] = '1'; | |
536 TextC1[5] = '1'; | |
537 TextC1[6] = '1'; | |
538 TextC1[7] = '1'; | |
539 TextC1[8] = '1'; | |
540 TextC1[9] = '1'; | |
541 TextC1[10] = '1'; | |
542 TextC1[11] = '1'; | |
543 TextC1[12] = '1'; | |
544 TextC1[13] = '1'; | |
545 TextC1[14] = '0'; | |
546 TextC1[15] = 0; | |
547 | |
548 for(int i=1;i<=10;i++) | |
549 { | |
550 if( stateUsed_scooterRemainingBattCapacity() > (9 * i)) | |
551 TextC1[i+3] += 1; | |
552 } | |
553 | |
554 if(stateUsed_scooterRemainingBattCapacity() < 10) | |
555 TextC1[2] = '\025'; | |
556 | |
557 if(!warning_count_high_time) | |
558 TextC1[4] = '2'; | |
559 | |
560 if(stateUsed->lifeData.scooterAgeInMilliSeconds > 1500) | |
561 TextC1[2] = '\031'; | |
562 | |
563 GFX_write_string(&Batt24,tXc1,TextC1,0); | |
564 } | |
565 | |
566 | 509 |
567 void t3_refresh_customview(float depth) | 510 void t3_refresh_customview(float depth) |
568 { | 511 { |
569 if((t3_selection_customview == CVIEW_sensors) &&(stateUsed->diveSettings.ccrOption == 0)) | 512 if((t3_selection_customview == CVIEW_sensors) &&(stateUsed->diveSettings.ccrOption == 0)) |
570 t3_change_customview(); | 513 t3_change_customview(); |
681 uint8_t nextstopDepthMeter = 0; | 624 uint8_t nextstopDepthMeter = 0; |
682 SDivetime SafetyStopTime = {0,0,0,0}; | 625 SDivetime SafetyStopTime = {0,0,0,0}; |
683 | 626 |
684 // CVIEW_T3_ppO2andGas | 627 // CVIEW_T3_ppO2andGas |
685 uint8_t oxygen_percentage = 0; | 628 uint8_t oxygen_percentage = 0; |
686 float scooterSpeed; | |
687 | 629 |
688 // CVIEW_T3_Temperature | 630 // CVIEW_T3_Temperature |
689 float temperatureThisCall; | 631 float temperatureThisCall; |
690 float temperature; | 632 float temperature; |
691 | 633 |
712 tempWinC2X0 = tXc2->WindowX0; | 654 tempWinC2X0 = tXc2->WindowX0; |
713 tempWinC2Tab = tXc2->WindowTab; | 655 tempWinC2Tab = tXc2->WindowTab; |
714 | 656 |
715 switch(tX_selection_customview) | 657 switch(tX_selection_customview) |
716 { | 658 { |
717 case CVIEW_Scooter: | |
718 snprintf(text,TEXTSIZE,"\032\fScooter"); | |
719 GFX_write_string(&FontT42,tXc1,text,0); | |
720 | |
721 t3_basics_battery_scooter_customview_extra(tXc1); | |
722 | |
723 scooterSpeed = stateUsed->lifeData.scooterDrehzahl * 80 / 3300; | |
724 | |
725 snprintf(text,100,"\030\003%.1f",scooterSpeed); | |
726 if(stateUsed->lifeData.scooterAgeInMilliSeconds > 1500) | |
727 text[0] = '\031'; | |
728 GFX_write_string(&FontT105,tXc1,text,0); | |
729 break; | |
730 | |
731 | |
732 case CVIEW_T3_ApnoeSurfaceInfo: | 659 case CVIEW_T3_ApnoeSurfaceInfo: |
733 snprintf(text,TEXTSIZE,"\032\f%c",TXT_MaxDepth); | 660 snprintf(text,TEXTSIZE,"\032\f%c",TXT_MaxDepth); |
734 GFX_write_string(&FontT42,tXc1,text,0); | 661 GFX_write_string(&FontT42,tXc1,text,0); |
735 | 662 |
736 tXc1->WindowY0 = 100; // obere Zeile | 663 tXc1->WindowY0 = 100; // obere Zeile |