comparison Discovery/Src/tMenuEditSystem.c @ 470:dd0d0952ef35

Merged in Ideenmodellierer/ostc4/Improve_Logtansfer (pull request #42) Improve Logtansfer
author heinrichsweikamp <bitbucket@heinrichsweikamp.com>
date Wed, 15 Apr 2020 07:01:11 +0000
parents aa1d71875e25
children b560e474e319
comparison
equal deleted inserted replaced
462:dddfe7917131 470:dd0d0952ef35
39 #include "tMenuEdit.h" 39 #include "tMenuEdit.h"
40 #include "tMenuSystem.h" 40 #include "tMenuSystem.h"
41 #include "motion.h" 41 #include "motion.h"
42 #include "t7.h" 42 #include "t7.h"
43 43
44 /* Uncomment to activate a menu item in reset menu which provide sample ring analysis / repair functionality */
45 #define ENABLE_ANALYSE_SAMPLES
46
47 #define CV_SUBPAGE_MAX (2u) /* max number of customer view selection pages */ 44 #define CV_SUBPAGE_MAX (2u) /* max number of customer view selection pages */
48 /*#define HAVE_DEBUG_VIEW */ 45 /*#define HAVE_DEBUG_VIEW */
49 static uint8_t infoPage = 0; 46 static uint8_t infoPage = 0;
50 47
51 /* Private function prototypes -----------------------------------------------*/ 48 /* Private function prototypes -----------------------------------------------*/
95 uint8_t OnAction_RebootMainCPU (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); 92 uint8_t OnAction_RebootMainCPU (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action);
96 uint8_t OnAction_Nothing (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); 93 uint8_t OnAction_Nothing (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action);
97 uint8_t OnAction_LogbookOffset(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); 94 uint8_t OnAction_LogbookOffset(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action);
98 uint8_t OnAction_SetFactoryDefaults(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); 95 uint8_t OnAction_SetFactoryDefaults(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action);
99 uint8_t OnAction_SetBatteryCharge(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); 96 uint8_t OnAction_SetBatteryCharge(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action);
97 #ifdef ENABLE_ANALYSE_SAMPLES
100 uint8_t OnAction_RecoverSampleIdx(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); 98 uint8_t OnAction_RecoverSampleIdx(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action);
99 #endif
101 #ifdef SCREENTEST 100 #ifdef SCREENTEST
102 uint8_t OnAction_ScreenTest (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); 101 uint8_t OnAction_ScreenTest (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action);
103 #endif 102 #endif
104 uint8_t OnAction_Information (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action); 103 uint8_t OnAction_Information (uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action);
105 /* 104 /*
1633 { 1632 {
1634 settingsWriteFactoryDefaults(settingsGetPointer()->ButtonResponsiveness[3], settingsGetPointer()->buttonBalance); 1633 settingsWriteFactoryDefaults(settingsGetPointer()->ButtonResponsiveness[3], settingsGetPointer()->buttonBalance);
1635 return EXIT_TO_MENU; 1634 return EXIT_TO_MENU;
1636 } 1635 }
1637 1636
1638 1637 #ifdef ENABLE_ANALYSE_SAMPLES
1639 uint8_t OnAction_RecoverSampleIdx(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) 1638 uint8_t OnAction_RecoverSampleIdx(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action)
1640 { 1639 {
1641 char text[32]; 1640 char text[32];
1642 char strResult[20]; 1641 char strResult[20];
1643
1644 1642
1645 ext_flash_AnalyseSampleBuffer(strResult); 1643 ext_flash_AnalyseSampleBuffer(strResult);
1646 snprintf(&text[0],30,"Ring: %s",strResult); //"Code: %X",settingsGetPointer()->logFlashNextSampleStartAddress); //getLicence()); 1644 snprintf(&text[0],30,"Ring: %s",strResult); //"Code: %X",settingsGetPointer()->logFlashNextSampleStartAddress); //getLicence());
1647 write_label_var( 30, 800, ME_Y_LINE6, &FontT42, text); 1645 write_label_var( 30, 800, ME_Y_LINE6, &FontT42, text);
1648 return UNSPECIFIC_RETURN; 1646 return UNSPECIFIC_RETURN;
1649 } 1647 }
1648 #endif
1650 1649
1651 uint8_t OnAction_SetBatteryCharge(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) 1650 uint8_t OnAction_SetBatteryCharge(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action)
1652 { 1651 {
1653 setBatteryPercentage(settingsGetPointer()->lastKnownBatteryPercentage); 1652 setBatteryPercentage(settingsGetPointer()->lastKnownBatteryPercentage);
1654 // setBatteryPercentage(100); 1653 // setBatteryPercentage(100);