Mercurial > public > mk2
comparison code_part1/OSTC_code_asm_part1/simulator.asm @ 575:cbdcbbc91877
some code cleaning
author | heinrichsweikamp |
---|---|
date | Sat, 21 Apr 2012 15:08:09 +0200 |
parents | 3091628b2742 |
children | ab2686087bce |
comparison
equal
deleted
inserted
replaced
574:101fec6a6137 | 575:cbdcbbc91877 |
---|---|
61 call PLED_menu_cursor | 61 call PLED_menu_cursor |
62 | 62 |
63 menu_simulator_loop: | 63 menu_simulator_loop: |
64 call check_switches_menu | 64 call check_switches_menu |
65 menu_simulator_loop2: | 65 menu_simulator_loop2: |
66 btfss onesecupdate | 66 btfsc onesecupdate |
67 bra menu_simulator_loop3 | 67 call menu_check_dive_and_timeout ; "Goto restart" or sets sleepmode flag |
68 | |
69 call timeout_surfmode | |
70 call set_dive_modes | |
71 call test_charger ; check if charger IC is active | |
72 call get_battery_voltage ; get battery voltage | |
73 | |
74 bcf onesecupdate ; End of one second tasks | 68 bcf onesecupdate ; End of one second tasks |
75 | 69 |
76 menu_simulator_loop3: | |
77 btfsc menubit2 | 70 btfsc menubit2 |
78 goto menu_simulator_do ; call submenu | 71 goto menu_simulator_do ; call submenu |
79 | 72 |
80 btfss menubit | 73 btfss menubit |
81 goto menu_simulator_exit | 74 goto menu_simulator_exit |
82 | 75 |
83 btfsc sleepmode | 76 btfsc sleepmode |
84 goto menu_simulator_exit | 77 goto menu_simulator_exit |
85 | |
86 btfsc divemode | |
87 goto restart ; exit menu, restart and enter divemode | |
88 | 78 |
89 bra menu_simulator_loop | 79 bra menu_simulator_loop |
90 | 80 |
91 menu_simulator_do: ; calls submenu | 81 menu_simulator_do: ; calls submenu |
92 dcfsnz menupos,F | 82 dcfsnz menupos,F |
246 | 236 |
247 simulator_show_decoplan1: | 237 simulator_show_decoplan1: |
248 bcf switch_left | 238 bcf switch_left |
249 bcf switch_right | 239 bcf switch_right |
250 simulator_show_decoplan2: | 240 simulator_show_decoplan2: |
251 btfsc uart_dump_screen ; Asked to dump screen contains ? | 241 btfsc uart_dump_screen ; Asked to dump screen contains ? |
252 call dump_screen ; Yes! | 242 call dump_screen ; Yes! |
253 | 243 |
254 btfss onesecupdate | 244 btfsc onesecupdate |
255 bra simulator_show_decoplan3 | 245 call menu_check_dive_and_timeout ; "Goto restart" or sets sleepmode flag |
256 | 246 |
257 call timeout_surfmode | 247 bcf onesecupdate ; End of one second tasks |
258 call set_dive_modes | |
259 call test_charger ; check if charger IC is active | |
260 call get_battery_voltage ; get battery voltage | |
261 | |
262 bcf onesecupdate ; End of one second tasks | |
263 | 248 |
264 simulator_show_decoplan3: | 249 simulator_show_decoplan3: |
265 btfsc switch_right | 250 btfsc switch_right |
266 bra menu_simulator1 ; Quit display | 251 bra menu_simulator1 ; Quit display |
267 | 252 |
268 btfsc switch_left | 253 btfsc switch_left |
269 bra simulator_show_decoplan5 ; Next decoplan-page. | 254 bra simulator_show_decoplan5 ; Next decoplan-page. |
270 | 255 |
271 btfsc sleepmode | 256 btfsc sleepmode |
272 goto more_menu | 257 goto more_menu |
273 | |
274 btfsc divemode | |
275 goto restart ; exit menu, restart and enter divemode | |
276 | 258 |
277 bra simulator_show_decoplan2 | 259 bra simulator_show_decoplan2 |
278 | 260 |
279 simulator_show_decoplan5: | 261 simulator_show_decoplan5: |
280 incf decoplan_page,F | 262 incf decoplan_page,F |