comparison Discovery/Src/tMenuEditSystem.c @ 138:cc9c18075e00 FlipDisplay

Removed no longer supported scooter code
author Ideenmodellierer
date Sat, 23 Feb 2019 21:10:51 +0100
parents ee7f2cd9b9b4
children b2a9e9b02df0
comparison
equal deleted inserted replaced
137:9eda5a75c5fd 138:cc9c18075e00
27 ////////////////////////////////////////////////////////////////////////////// 27 //////////////////////////////////////////////////////////////////////////////
28 28
29 /* Includes ------------------------------------------------------------------*/ 29 /* Includes ------------------------------------------------------------------*/
30 #include "tMenuEditSystem.h" 30 #include "tMenuEditSystem.h"
31 31
32 #include "data_exchange_main.h" // for DataEX_scooterDataFound() 32 #include "data_exchange_main.h"
33 #include "externLogbookFlash.h" 33 #include "externLogbookFlash.h"
34 #include "gfx_fonts.h" 34 #include "gfx_fonts.h"
35 #include "ostc.h" 35 #include "ostc.h"
36 #include "settings.h" // for getLicence() 36 #include "settings.h" // for getLicence()
37 #include "tHome.h" // for enum CUSTOMVIEWS and init_t7_compass() 37 #include "tHome.h" // for enum CUSTOMVIEWS and init_t7_compass()
766 text[1] = TXT2BYTE_CViewStandard; 766 text[1] = TXT2BYTE_CViewStandard;
767 text[2] = ' '; 767 text[2] = ' ';
768 text[3] = ' '; 768 text[3] = ' ';
769 switch(settingsGetPointer()->tX_customViewPrimary) 769 switch(settingsGetPointer()->tX_customViewPrimary)
770 { 770 {
771 case CVIEW_Scooter:
772 text[4] = TXT_2BYTE;
773 text[5] = TXT2BYTE_ScooterMonitor;
774 break;
775 case CVIEW_sensors: 771 case CVIEW_sensors:
776 text[4] = TXT_2BYTE; 772 text[4] = TXT_2BYTE;
777 text[5] = TXT2BYTE_O2monitor; 773 text[5] = TXT2BYTE_O2monitor;
778 break; 774 break;
779 case CVIEW_sensors_mV: 775 case CVIEW_sensors_mV:
935 uint8_t OnAction_CViewStandard(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) 931 uint8_t OnAction_CViewStandard(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action)
936 { 932 {
937 uint8_t newValue; 933 uint8_t newValue;
938 switch(settingsGetPointer()->tX_customViewPrimary) 934 switch(settingsGetPointer()->tX_customViewPrimary)
939 { 935 {
940 case CVIEW_Scooter:
941 newValue = CVIEW_sensors;
942 break;
943 case CVIEW_sensors: 936 case CVIEW_sensors:
944 newValue = CVIEW_sensors_mV; 937 newValue = CVIEW_sensors_mV;
945 break; 938 break;
946 case CVIEW_sensors_mV: 939 case CVIEW_sensors_mV:
947 newValue = CVIEW_Compass; 940 newValue = CVIEW_Compass;
967 case CVIEW_SummaryOfLeftCorner: 960 case CVIEW_SummaryOfLeftCorner:
968 newValue = CVIEW_noneOrDebug; 961 newValue = CVIEW_noneOrDebug;
969 break; 962 break;
970 case CVIEW_noneOrDebug: 963 case CVIEW_noneOrDebug:
971 default: 964 default:
972 if(getLicence() == LICENCEBONEX) 965 newValue = CVIEW_sensors;
973 newValue = CVIEW_Scooter;
974 else
975 newValue = CVIEW_sensors;
976 break; 966 break;
977 } 967 }
978 settingsGetPointer()->tX_customViewPrimary = newValue; 968 settingsGetPointer()->tX_customViewPrimary = newValue;
979 return UPDATE_DIVESETTINGS; 969 return UPDATE_DIVESETTINGS;
980 } 970 }
1409 text[1] = TXT2BYTE_WarnBatteryLow; 1399 text[1] = TXT2BYTE_WarnBatteryLow;
1410 text[2] = 0; 1400 text[2] = 0;
1411 snprintf(&text[2],10,": %01.2fV",stateRealGetPointer()->lifeData.battery_voltage); 1401 snprintf(&text[2],10,": %01.2fV",stateRealGetPointer()->lifeData.battery_voltage);
1412 write_label_var( 30, 800, ME_Y_LINE4, &FontT42, text); 1402 write_label_var( 30, 800, ME_Y_LINE4, &FontT42, text);
1413 1403
1414
1415 if(DataEX_scooterDataFound())
1416 {
1417 snprintf(&text[0],30,"Ext: %01.1fV @ %01.1f \140C",stateUsed->lifeData.scooterSpannung, stateUsed->lifeData.scooterTemperature / 10.0f);
1418 write_label_var( 30, 800, ME_Y_LINE5, &FontT42, text);
1419 }
1420
1421 snprintf(&text[0],30,"Code: %X",getLicence()); 1404 snprintf(&text[0],30,"Code: %X",getLicence());
1422 write_label_var( 30, 800, ME_Y_LINE6, &FontT42, text); 1405 write_label_var( 30, 800, ME_Y_LINE6, &FontT42, text);
1423 break; 1406 break;
1424 1407
1425 } 1408 }