comparison Discovery/Src/tMenuEditSystem.c @ 661:87bee7cc77b3

Undo Rev. 660
author heinrichs weikamp
date Mon, 01 Nov 2021 12:39:34 +0100
parents f4b553da620a
children 1b995079c045
comparison
equal deleted inserted replaced
660:f4b553da620a 661:87bee7cc77b3
32 #include "data_exchange_main.h" 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 "tComm.h"
38 #include "tHome.h" // for enum CUSTOMVIEWS and init_t7_compass() 37 #include "tHome.h" // for enum CUSTOMVIEWS and init_t7_compass()
39 #include "tMenu.h" 38 #include "tMenu.h"
40 #include "tMenuEdit.h" 39 #include "tMenuEdit.h"
41 #include "tMenuSystem.h" 40 #include "tMenuSystem.h"
42 #include "tMenuEditCustom.h" 41 #include "tMenuEditCustom.h"
85 uint8_t OnAction_ResetLogbook (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); 84 uint8_t OnAction_ResetLogbook (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action);
86 uint8_t OnAction_RebootMainCPU (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); 85 uint8_t OnAction_RebootMainCPU (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action);
87 uint8_t OnAction_Nothing (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); 86 uint8_t OnAction_Nothing (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action);
88 uint8_t OnAction_LogbookOffset(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); 87 uint8_t OnAction_LogbookOffset(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action);
89 uint8_t OnAction_SetFactoryDefaults(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); 88 uint8_t OnAction_SetFactoryDefaults(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action);
90 uint8_t OnAction_ResetBluetooth(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action);
91 uint8_t OnAction_SetBatteryCharge(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); 89 uint8_t OnAction_SetBatteryCharge(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action);
92 #ifdef ENABLE_ANALYSE_SAMPLES 90 #ifdef ENABLE_ANALYSE_SAMPLES
93 uint8_t OnAction_RecoverSampleIdx(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); 91 uint8_t OnAction_RecoverSampleIdx(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action);
94 #endif 92 #endif
95 #ifdef SCREENTEST 93 #ifdef SCREENTEST
1073 text[0] = TXT_2BYTE; 1071 text[0] = TXT_2BYTE;
1074 text[1] = TXT2BYTE_SetFactoryDefaults; 1072 text[1] = TXT2BYTE_SetFactoryDefaults;
1075 text[2] = 0; 1073 text[2] = 0;
1076 write_field_button(StMSYS5_SetFactoryBC, 30, 800, ME_Y_LINE2, &FontT48, text); 1074 write_field_button(StMSYS5_SetFactoryBC, 30, 800, ME_Y_LINE2, &FontT48, text);
1077 1075
1078 text[0] = TXT_2BYTE;
1079 text[1] = TXT2BYTE_ResetBluetooth;
1080 text[2] = 0;
1081 write_field_button(StMSYS5_ResetBluetooth, 30, 800, ME_Y_LINE3, &FontT48, text);
1082
1083 #ifdef ENABLE_ANALYSE_SAMPLES 1076 #ifdef ENABLE_ANALYSE_SAMPLES
1084 text[0] = TXT_2BYTE; 1077 text[0] = TXT_2BYTE;
1085 text[1] = TXT2BYTE_SetSampleIndex; 1078 text[1] = TXT2BYTE_SetSampleIndex;
1086 text[2] = 0; 1079 text[2] = 0;
1087 write_field_button(StMSYS5_SetSampleIndx, 30, 800, ME_Y_LINE4, &FontT48, text); 1080 write_field_button(StMSYS5_SetSampleIndx, 30, 800, ME_Y_LINE3, &FontT48, text);
1088 #endif 1081 #endif
1089 1082
1090 1083
1091 if(stateRealGetPointer()->lifeData.battery_charge == 0) 1084 if(stateRealGetPointer()->lifeData.battery_charge == 0)
1092 { 1085 {
1100 write_field_button(StMSYS5_SetBattCharge, 30, 800, ME_Y_LINE3, &FontT48, text); 1093 write_field_button(StMSYS5_SetBattCharge, 30, 800, ME_Y_LINE3, &FontT48, text);
1101 #endif 1094 #endif
1102 1095
1103 setEvent(StMSYS5_Exit, (uint32_t)OnAction_Exit); 1096 setEvent(StMSYS5_Exit, (uint32_t)OnAction_Exit);
1104 setEvent(StMSYS5_SetFactoryBC, (uint32_t)OnAction_SetFactoryDefaults); 1097 setEvent(StMSYS5_SetFactoryBC, (uint32_t)OnAction_SetFactoryDefaults);
1105 setEvent(StMSYS5_ResetBluetooth, (uint32_t)OnAction_ResetBluetooth);
1106 #ifdef ENABLE_ANALYSE_SAMPLES 1098 #ifdef ENABLE_ANALYSE_SAMPLES
1107 setEvent(StMSYS5_SetSampleIndx, (uint32_t)OnAction_RecoverSampleIdx); 1099 setEvent(StMSYS5_SetSampleIndx, (uint32_t)OnAction_RecoverSampleIdx);
1108 #endif 1100 #endif
1109 setEvent(StMSYS5_SetBattCharge, (uint32_t)OnAction_SetBatteryCharge); 1101 setEvent(StMSYS5_SetBattCharge, (uint32_t)OnAction_SetBatteryCharge);
1110 } 1102 }
1111 else 1103 else
1112 { 1104 {
1113 setEvent(StMSYS5_Exit, (uint32_t)OnAction_Exit); 1105 setEvent(StMSYS5_Exit, (uint32_t)OnAction_Exit);
1114 setEvent(StMSYS5_SetFactoryBC, (uint32_t)OnAction_SetFactoryDefaults); 1106 setEvent(StMSYS5_SetFactoryBC, (uint32_t)OnAction_SetFactoryDefaults);
1115 setEvent(StMSYS5_ResetBluetooth, (uint32_t)OnAction_ResetBluetooth);
1116 #ifdef ENABLE_ANALYSE_SAMPLES 1107 #ifdef ENABLE_ANALYSE_SAMPLES
1117 setEvent(StMSYS5_SetSampleIndx, (uint32_t)OnAction_RecoverSampleIdx); 1108 setEvent(StMSYS5_SetSampleIndx, (uint32_t)OnAction_RecoverSampleIdx);
1118 #endif 1109 #endif
1119 } 1110 }
1120 // write_field_button(StMSYS5_ScreenTest, 30, 800, ME_Y_LINE3, &FontT48, "Screen Test"); 1111 // write_field_button(StMSYS5_ScreenTest, 30, 800, ME_Y_LINE3, &FontT48, "Screen Test");
1231 { 1222 {
1232 settingsWriteFactoryDefaults(settingsGetPointer()->ButtonResponsiveness[3], settingsGetPointer()->buttonBalance); 1223 settingsWriteFactoryDefaults(settingsGetPointer()->ButtonResponsiveness[3], settingsGetPointer()->buttonBalance);
1233 return EXIT_TO_MENU; 1224 return EXIT_TO_MENU;
1234 } 1225 }
1235 1226
1236 uint8_t OnAction_ResetBluetooth(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action)
1237 {
1238 tComm_Set_Bluetooth_Name(1);
1239
1240 return EXIT_TO_MENU;
1241 }
1242
1243 #ifdef ENABLE_ANALYSE_SAMPLES 1227 #ifdef ENABLE_ANALYSE_SAMPLES
1244 uint8_t OnAction_RecoverSampleIdx(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) 1228 uint8_t OnAction_RecoverSampleIdx(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action)
1245 { 1229 {
1246 char text[32]; 1230 char text[32];
1247 uint8_t openSec; 1231 uint8_t openSec;