comparison src/menu_tree.asm @ 640:8c1f1f334275

3.13 release
author heinrichsweikamp
date Thu, 29 Oct 2020 09:29:15 +0100
parents a3b21497d17e
children 7d8a4c60ec1a 5b7fe7777425
comparison
equal deleted inserted replaced
639:0ff82370991d 640:8c1f1f334275
1 ;============================================================================= 1 ;=============================================================================
2 ; 2 ;
3 ; File menu_tree.asm * combined next generation V3.09.5 3 ; File menu_tree.asm * combined next generation V3.12.2
4 ; 4 ;
5 ; OSTC Surface Menus 5 ; OSTC Surface Menus
6 ; 6 ;
7 ; Copyright (c) 2011, JD Gascuel, HeinrichsWeikamp, all right reserved. 7 ; Copyright (c) 2011, JD Gascuel, HeinrichsWeikamp, all right reserved.
8 ;============================================================================= 8 ;=============================================================================
781 ;----------------------------------------------------------------------------- 781 ;-----------------------------------------------------------------------------
782 ; return to Dive Settings Menu from Sub-Menu 782 ; return to Dive Settings Menu from Sub-Menu
783 ; 783 ;
784 do_return_menu_dive: 784 do_return_menu_dive:
785 call menu_processor_double_pop ; drop exit line and back to last line 785 call menu_processor_double_pop ; drop exit line and back to last line
786 ;bra do_menu_dive ; continue 786 ;bra do_menu_dive ; continue
787 787
788 ;----------------------------------------------------------------------------- 788 ;-----------------------------------------------------------------------------
789 ; Dive Settings Menu - 1st Layer 789 ; Dive Settings Menu - 1st Layer
790 ; 790 ;
791 do_menu_dive: 791 do_menu_dive:
801 ;----------------------------------------------------------------------------- 801 ;-----------------------------------------------------------------------------
802 ; Dive Settings Menu - 2nd Layer - Dive Mode 802 ; Dive Settings Menu - 2nd Layer - Dive Mode
803 ; 803 ;
804 do_menu_dive_dive: 804 do_menu_dive_dive:
805 IFDEF _cave_mode 805 IFDEF _cave_mode
806 MENU_BEGIN tDiveModeMenu, .6 806 MENU_BEGIN tDiveSetup, .6
807 MENU_OPT_INC tDvMode, oDiveMode ; dive mode 807 MENU_OPT_INC tDvMode, oDiveMode ; dive mode
808 MENU_OPT_INC tCvMode, oCaveMode ; cave mode 808 MENU_OPT_INC tCvMode, oCaveMode ; cave mode
809 MENU_OPT_INC tFTTSMenu, oExtraTime ; fTTS/delay 809 MENU_OPT_INC tFTTSMenu, oExtraTime ; fTTS/delay
810 MENU_OPT_INC tTimeoutDive, oDiveTimeout ; dive timeout 810 MENU_OPT_INC tTimeoutDive, oDiveTimeout ; dive timeout
811 MENU_OPT_INC tStoreApnoeDive, oStoreApnoe ; store apnoe 811 MENU_OPT_INC tStoreApnoeDive, oStoreApnoe ; store apnoe
812 MENU_CALL tBack, do_return_menu_dive 812 MENU_CALL tBack, do_return_menu_dive
813 MENU_END 813 MENU_END
814 ELSE 814 ELSE
815 MENU_BEGIN tDiveModeMenu, .5 815 MENU_BEGIN tDiveSetup, .5
816 MENU_OPT_INC tDvMode, oDiveMode ; dive mode 816 MENU_OPT_INC tDvMode, oDiveMode ; dive mode
817 MENU_OPT_INC tFTTSMenu, oExtraTime ; fTTS/delay 817 MENU_OPT_INC tFTTSMenu, oExtraTime ; fTTS/delay
818 MENU_OPT_INC tTimeoutDive, oDiveTimeout ; dive timeout 818 MENU_OPT_INC tTimeoutDive, oDiveTimeout ; dive timeout
819 MENU_OPT_INC tStoreApnoeDive, oStoreApnoe ; store apnoe 819 MENU_OPT_INC tStoreApnoeDive, oStoreApnoe ; store apnoe
820 MENU_CALL tBack, do_return_menu_dive 820 MENU_CALL tBack, do_return_menu_dive
825 ;----------------------------------------------------------------------------- 825 ;-----------------------------------------------------------------------------
826 ; return to Dive Settings Menu from Sub-Menu 826 ; return to Dive Settings Menu from Sub-Menu
827 ; 827 ;
828 do_return_menu_dive_deco: 828 do_return_menu_dive_deco:
829 call menu_processor_double_pop ; drop exit line and back to last line 829 call menu_processor_double_pop ; drop exit line and back to last line
830 ;bra do_menu_dive_deco ; continue 830 ;bra do_menu_dive_deco ; continue
831 831
832 832
833 ;----------------------------------------------------------------------------- 833 ;-----------------------------------------------------------------------------
834 ; Dive Settings Menu - 2nd Layer - Deco Mode 834 ; Dive Settings Menu - 2nd Layer - Deco Mode
835 ; 835 ;
836 do_menu_dive_deco: 836 do_menu_dive_deco:
837 MENU_BEGIN tDecoSetup, .6 837 MENU_BEGIN tDecoSetup, .5
838 MENU_OPT_INC tDkMode, oDecoMode ; ZH-L16 /GF 838 MENU_OPT_INC tDkMode, oDecoMode ; ZH-L16 /GF
839 MENU_OPT_INC tSaturationMult, osatmultgf ; saturation 839 MENU_CALL tSDMenu, do_menu_dive_deco_SD ; SD settings
840 MENU_OPT_INC tDesaturationMult, odesatmultgf ; desaturation 840 MENU_CALL tGFMenu, do_menu_dive_deco_GF ; GF settings
841 MENU_OPT_INC tAltMode, oAltMode ; altitude mode 841 MENU_OPT_INC tAltMode, oAltMode ; altitude mode
842 MENU_CALL tGFMenu, do_menu_dive_deco_GF ; GF settings
843 MENU_CALL tBack, do_return_menu_dive 842 MENU_CALL tBack, do_return_menu_dive
843 MENU_END
844
845
846 ;-----------------------------------------------------------------------------
847 ; Dive Settings Menu - 3nd Layer - Deco Mode - SD Settings
848 ;
849 do_menu_dive_deco_SD:
850 TSTOSS char_I_model ; in GF mode?
851 bra do_menu_dive_deco_SD_noGF ; NO
852 ;bra do_menu_dive_deco_SD_GF ; YES
853
854 do_menu_dive_deco_SD_GF:
855 MENU_BEGIN tSDMenu, .3
856 MENU_OPT_INC tSaturationMult, osatmultgf ; saturation GF mode
857 MENU_OPT_INC tDesaturationMult, odesatmultgf ; desaturation GF mode
858 MENU_CALL tBack, do_return_menu_dive_deco
859 MENU_END
860
861 do_menu_dive_deco_SD_noGF:
862 MENU_BEGIN tSDMenu, .3
863 MENU_OPT_INC tSaturationMult, osatmult ; saturation non-GF mode
864 MENU_OPT_INC tDesaturationMult, odesatmult ; desaturation non-GF mode
865 MENU_CALL tBack, do_return_menu_dive_deco
844 MENU_END 866 MENU_END
845 867
846 868
847 ;----------------------------------------------------------------------------- 869 ;-----------------------------------------------------------------------------
848 ; Dive Settings Menu - 3nd Layer - Deco Mode - GF Settings 870 ; Dive Settings Menu - 3nd Layer - Deco Mode - GF Settings
1807 1829
1808 ;----------------------------------------------------------------------------- 1830 ;-----------------------------------------------------------------------------
1809 ; Settings Menu - 3rd Layer - System Settings - adjust Piezo Buttons 1831 ; Settings Menu - 3rd Layer - System Settings - adjust Piezo Buttons
1810 ; 1832 ;
1811 do_menu_piezo: 1833 do_menu_piezo:
1812 MENU_BEGIN tPiezo, .3 1834 MENU_BEGIN tPiezo, .5
1835 MENU_CALL tButtonExplain1, 0
1836 MENU_CALL tButtonExplain2, 0
1813 MENU_OPT_INC tButtonleft, ocR_button_left ; left button sensitivity 1837 MENU_OPT_INC tButtonleft, ocR_button_left ; left button sensitivity
1814 MENU_OPT_INC tButtonright, ocR_button_right ; right button sensitivity 1838 MENU_OPT_INC tButtonright, ocR_button_right ; right button sensitivity
1815 MENU_CALL tBack, do_return_menu_syssets_piezo 1839 MENU_CALL tBack, do_return_menu_syssets_piezo
1816 MENU_END 1840 MENU_END
1817 1841
2030 ; Entry Point for Battery Selection after Power-Outage 2054 ; Entry Point for Battery Selection after Power-Outage
2031 ; 2055 ;
2032 global new_battery_select 2056 global new_battery_select
2033 new_battery_select: 2057 new_battery_select:
2034 call TFT_boot ; initialize TFT (includes clear screen) 2058 call TFT_boot ; initialize TFT (includes clear screen)
2059 call TFT_load_std_color_pallet ; load standard color pallet
2035 call TFT_Display_FadeIn ; dim up the display 2060 call TFT_Display_FadeIn ; dim up the display
2036 call menu_processor_reset ; reset menu stack 2061 call menu_processor_reset ; reset menu stack
2037 ;bra do_new_battery_select ; enter menu system 2062 ;bra do_new_battery_select ; enter menu system
2038 2063
2039 2064
2054 2079
2055 ; hardware descriptor: user changeable battery charger supported battery types 2080 ; hardware descriptor: user changeable battery charger supported battery types
2056 ; ------------------------------------------------------------------------------------------------------------------------------------------------------- 2081 ; -------------------------------------------------------------------------------------------------------------------------------------------------------
2057 ; 0x11: BLE and battery gauge ---> OSTC 2 (old model) NO YES internal 18650 2082 ; 0x11: BLE and battery gauge ---> OSTC 2 (old model) NO YES internal 18650
2058 ; 0x05: analog input and battery gauge ---> OSTC 2 cR NO YES internal 18650 2083 ; 0x05: analog input and battery gauge ---> OSTC 2 cR NO YES internal 18650
2084 ; 0x15: BLE and analog input and battery gauge ---> OSTC 2 cR (2020 model) NO YES internal 18650
2059 ; 0x33: BLE and RX module and ambient sensor and battery gauge ---> OSTC 2 TR NO YES internal 16650 2085 ; 0x33: BLE and RX module and ambient sensor and battery gauge ---> OSTC 2 TR NO YES internal 16650
2060 ; 0x13: BLE and ambient sensor and battery gauge -+-> OSTC 2 (new model) NO YES internal 16650 2086 ; 0x13: BLE and ambient sensor and battery gauge -+-> OSTC 2 (new model) NO YES internal 16650
2061 ; +-> OSTC Plus YES YES 1.5V ----- NO! ----- 3.6V rechargeable 2087 ; +-> OSTC Plus YES YES 1.5V ----- NO! ----- 3.6V rechargeable
2062 ; 0x0A: optical input and ambient sensor ---> OSTC 3 (USB model) YES NO 1.5V 3.6V disposable 3.6V rechargeable 2088 ; 0x0A: optical input and ambient sensor ---> OSTC 3 (USB model) YES NO 1.5V 3.6V disposable 3.6V rechargeable
2063 ; 0x1A: BLE and optical input and ambient sensor ---> OSTC 3 (BLE model) YES NO 1.5V 3.6V disposable 3.6V rechargeable 2089 ; 0x1A: BLE and optical input and ambient sensor ---> OSTC 3 (BLE model) YES NO 1.5V 3.6V disposable 3.6V rechargeable
2077 movlw 0x05 ; OSTC 2 cR 2103 movlw 0x05 ; OSTC 2 cR
2078 cpfseq HW_descriptor 2104 cpfseq HW_descriptor
2079 bra $+4 2105 bra $+4
2080 bra use_18650_battery 2106 bra use_18650_battery
2081 2107
2108 movlw 0x15 ; OSTC 2 cR (2020 model)
2109 cpfseq HW_descriptor
2110 bra $+4
2111 bra use_18650_battery
2112
2113
2082 movlw 0x85 ; OSTC 2 cR with block write 2114 movlw 0x85 ; OSTC 2 cR with block write
2083 cpfseq HW_descriptor 2115 cpfseq HW_descriptor
2084 bra $+4 2116 bra $+4
2085 bra use_18650_battery 2117 bra use_18650_battery
2086 2118
2092 movlw 0x93 ; OSTC Plus and OSTC 2 (2017 model) 2124 movlw 0x93 ; OSTC Plus and OSTC 2 (2017 model)
2093 cpfseq HW_descriptor 2125 cpfseq HW_descriptor
2094 bra $+4 2126 bra $+4
2095 bra do_menu_new_battery_AA_charger 2127 bra do_menu_new_battery_AA_charger
2096 2128
2097 movlw 0x13 ; OSTC Plus and OSTC 2 (2017 model), w/o blockwrite 2129 movlw 0x13 ; OSTC Plus and OSTC 2 (2017 model), w/o block write
2098 cpfseq HW_descriptor 2130 cpfseq HW_descriptor
2099 bra $+4 2131 bra $+4
2100 bra do_menu_new_battery_AA_charger 2132 bra do_menu_new_battery_AA_charger
2101 2133
2102 ; movlw 0x0A ; OSTC 3 (USB model) 2134
2103 ; cpfseq HW_descriptor 2135 movlw 0x0A ; OSTC 3 (USB model)
2104 ; bra $+4 2136 cpfseq HW_descriptor
2105 ; bra do_menu_new_battery_AA_no_charge 2137 bra $+4
2106 2138 bra do_menu_new_battery_AA_no_charge
2107 ; movlw 0x1A ; OSTC 3 (BLE model) 2139
2108 ; cpfseq HW_descriptor 2140 movlw 0x1A ; OSTC 3 (BLE model)
2109 ; bra $+4 2141 cpfseq HW_descriptor
2110 ; bra do_menu_new_battery_AA_no_charge 2142 bra $+4
2111 2143 bra do_menu_new_battery_AA_no_charge
2112 ; movlw 0x02 ; OSTC Sport (USB model) 2144
2113 ; cpfseq HW_descriptor 2145 movlw 0x02 ; OSTC Sport (USB model)
2114 ; bra $+4 2146 cpfseq HW_descriptor
2115 ; bra do_menu_new_battery_AA_no_charge 2147 bra $+4
2116 2148 bra do_menu_new_battery_AA_no_charge
2117 ; movlw 0x52 ; OSTC Sport (BLE model) 2149
2118 ; cpfseq HW_descriptor 2150 movlw 0x52 ; OSTC Sport (BLE model)
2119 ; bra $+4 2151 cpfseq HW_descriptor
2120 ; bra do_menu_new_battery_AA_no_charge 2152 bra $+4
2121 2153 bra do_menu_new_battery_AA_no_charge
2122 bra do_menu_new_battery_AA_no_charge ; any other model 2154
2155 bra do_menu_new_battery_other_model ; any other model
2123 2156
2124 2157
2125 ;----------------------------------------------------------------------------- 2158 ;-----------------------------------------------------------------------------
2126 ; return from confirm 3.6 V rechargeable 2159 ; return from confirm 3.6 V rechargeable
2127 ; 2160 ;
2128 do_return_menu_new_bat_AA_chrg: 2161 do_return_menu_new_bat_AA_chrg:
2129 call menu_processor_double_pop ; drop exit line and back to last line 2162 call menu_processor_double_pop ; drop exit line and back to last line
2130 ;bra do_menu_new_battery_AA_charger ; continue 2163 ;bra do_menu_new_battery_AA_charger ; continue
2164
2165 ;-----------------------------------------------------------------------------
2166 ; Battery Selection for OSTC (Full selection)
2167
2168 do_menu_new_battery_other_model:
2169 MENU_BEGIN tNewBattTitle, .6
2170 MENU_CALL tNewBattOld, do_use_old_battery ; load data of old battery
2171 MENU_CALL tNewBattNew15, do_use_15V_disposable ; not rechargeable
2172 MENU_CALL tNewBattNew36, do_use_36V_disposable ; not rechargeable
2173 MENU_CALL tNewBattAccu, do_menu_new_battery_36V_charge ; rechargeable -> goto safety question
2174 MENU_CALL tNew16650, do_use_16650_battery ; OSTC 2 new model
2175 MENU_CALL tNew18650, use_18650_battery ; OSTC 2 (2015 model)
2176 MENU_END
2131 2177
2132 ;----------------------------------------------------------------------------- 2178 ;-----------------------------------------------------------------------------
2133 ; Battery Selection for OSTC Plus (charging function) TODO: and OSTC 2 new model as of now 2179 ; Battery Selection for OSTC Plus (charging function) TODO: and OSTC 2 new model as of now
2134 ; 2180 ;
2135 do_menu_new_battery_AA_charger: 2181 do_menu_new_battery_AA_charger: