Mercurial > public > ostc4
comparison Discovery/Src/tMenuEditSystem.c @ 343:c9d217b110cc FlightMode_Improvment
Added compile switch to enable debug view option in system menu
Code lines for the option had to be uncommented one by one to get function activated. The compile switch makes life easier
author | ideenmodellierer |
---|---|
date | Tue, 01 Oct 2019 19:43:30 +0200 |
parents | 26c874cdde0d |
children | 14fd5f35cb50 |
comparison
equal
deleted
inserted
replaced
342:ea3fda8eb93e | 343:c9d217b110cc |
---|---|
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() |
38 #include "tMenu.h" | |
38 #include "tMenuEdit.h" | 39 #include "tMenuEdit.h" |
40 #include "tMenuSystem.h" | |
41 #include "t7.h" | |
42 | |
43 /* uncomment to activate debug view option */ | |
44 /*#define HAVE_DEBUG_VIEW */ | |
39 | 45 |
40 /* Private variables ---------------------------------------------------------*/ | 46 /* Private variables ---------------------------------------------------------*/ |
41 | 47 static uint8_t infoPage = 0; |
42 uint8_t infoPage = 0; | |
43 | 48 |
44 /* Private function prototypes -----------------------------------------------*/ | 49 /* Private function prototypes -----------------------------------------------*/ |
45 void openEdit_DateTime(void); | 50 void openEdit_DateTime(void); |
46 void openEdit_Language(void); | 51 void openEdit_Language(void); |
47 void openEdit_Design(void); | 52 void openEdit_Design(void); |
574 { | 579 { |
575 refresh_Design(); | 580 refresh_Design(); |
576 | 581 |
577 write_field_button(StMSYS3_Units, 400, 700, ME_Y_LINE1, &FontT48, ""); | 582 write_field_button(StMSYS3_Units, 400, 700, ME_Y_LINE1, &FontT48, ""); |
578 write_field_button(StMSYS3_Colors, 400, 700, ME_Y_LINE2, &FontT48, ""); | 583 write_field_button(StMSYS3_Colors, 400, 700, ME_Y_LINE2, &FontT48, ""); |
579 // write_field_button(StMSYS3_Debug, 400, 700, ME_Y_LINE3, &FontT48, ""); | 584 #ifdef HAVE_DEBUG_VIEW |
585 write_field_button(StMSYS3_Debug, 400, 700, ME_Y_LINE3, &FontT48, ""); | |
586 #endif | |
580 setEvent(StMSYS3_Units, (uint32_t)OnAction_Units); | 587 setEvent(StMSYS3_Units, (uint32_t)OnAction_Units); |
581 setEvent(StMSYS3_Colors, (uint32_t)OnAction_Colorscheme); | 588 setEvent(StMSYS3_Colors, (uint32_t)OnAction_Colorscheme); |
582 // setEvent(StMSYS3_Debug, (uint32_t)OnAction_DebugInfo); | 589 #ifdef HAVE_DEBUG_VIEW |
590 setEvent(StMSYS3_Debug, (uint32_t)OnAction_DebugInfo); | |
591 #endif | |
583 } | 592 } |
584 | 593 |
585 | 594 |
586 void refresh_Design(void) | 595 void refresh_Design(void) |
587 { | 596 { |
618 | 627 |
619 text[0] = '0' + settingsGetPointer()->tX_colorscheme; | 628 text[0] = '0' + settingsGetPointer()->tX_colorscheme; |
620 text[1] = 0; | 629 text[1] = 0; |
621 write_label_var( 400, 700, ME_Y_LINE2, &FontT48, text); | 630 write_label_var( 400, 700, ME_Y_LINE2, &FontT48, text); |
622 | 631 |
623 /* | 632 #ifdef HAVE_DEBUG_VIEW |
624 // specials | 633 // specials |
625 text[0] = TXT_2BYTE; | 634 text[0] = TXT_2BYTE; |
626 text[1] = TXT2BYTE_ShowDebug; | 635 text[1] = TXT2BYTE_ShowDebug; |
627 text[2] = 0; | 636 text[2] = 0; |
628 write_label_var( 30, 700, ME_Y_LINE3, &FontT48, text); | 637 write_label_var( 30, 700, ME_Y_LINE3, &FontT48, text); |
631 text[0] = '\005'; | 640 text[0] = '\005'; |
632 else | 641 else |
633 text[0] = '\006'; | 642 text[0] = '\006'; |
634 text[1] = 0; | 643 text[1] = 0; |
635 write_label_var( 400, 700, ME_Y_LINE3, &FontT48, text); | 644 write_label_var( 400, 700, ME_Y_LINE3, &FontT48, text); |
636 */ | 645 #endif |
637 | 646 |
638 // design | 647 // design |
639 text[0] = TXT_Depth; | 648 text[0] = TXT_Depth; |
640 text[1] = 0; | 649 text[1] = 0; |
641 write_content( 30, 700, ME_Y_LINE4, &FontT24, text, CLUT_Font031); | 650 write_content( 30, 700, ME_Y_LINE4, &FontT24, text, CLUT_Font031); |
730 | 739 |
731 write_field_button(StMSYS4_CViewTimeout, 400, 700, ME_Y_LINE1, &FontT48, ""); | 740 write_field_button(StMSYS4_CViewTimeout, 400, 700, ME_Y_LINE1, &FontT48, ""); |
732 write_field_button(StMSYS4_CViewStandard, 400, 700, ME_Y_LINE2, &FontT48, ""); | 741 write_field_button(StMSYS4_CViewStandard, 400, 700, ME_Y_LINE2, &FontT48, ""); |
733 | 742 |
734 write_field_button(StMSYS4_CornerTimeout, 400, 700, ME_Y_LINE3, &FontT48, ""); | 743 write_field_button(StMSYS4_CornerTimeout, 400, 700, ME_Y_LINE3, &FontT48, ""); |
735 write_field_button(StMSYS4_CornerStandard, 400, 700, ME_Y_LINE4, &FontT48, ""); | 744 write_field_button(StMSYS4_CornerStandard, 400, 700, ME_Y_LINE4, &FontT48, ""); |
736 | 745 |
737 write_field_button(StMSYS4_ExtraDisplay, 400, 700, ME_Y_LINE5, &FontT48, ""); | 746 write_field_button(StMSYS4_ExtraDisplay, 400, 700, ME_Y_LINE5, &FontT48, ""); |
738 | 747 |
739 setEvent(StMSYS4_CViewTimeout, (uint32_t)OnAction_CViewTimeout); | 748 setEvent(StMSYS4_CViewTimeout, (uint32_t)OnAction_CViewTimeout); |
740 setEvent(StMSYS4_CViewStandard, (uint32_t)OnAction_CViewStandard); | 749 setEvent(StMSYS4_CViewStandard, (uint32_t)OnAction_CViewStandard); |