Mercurial > public > hwos_code
comparison src/surfmode.asm @ 76:a5ea132770db
1.21 release
author | heinrichsweikamp |
---|---|
date | Wed, 19 Feb 2014 14:46:26 +0100 |
parents | ec4d8503ec45 |
children | f3062a611eef |
comparison
equal
deleted
inserted
replaced
75:b808fa26a9a1 | 76:a5ea132770db |
---|---|
84 clrf ext_flash_address+1 | 84 clrf ext_flash_address+1 |
85 clrf ext_flash_address+2 | 85 clrf ext_flash_address+2 |
86 | 86 |
87 clrf timeout_counter2 | 87 clrf timeout_counter2 |
88 clrf timeout_counter3 | 88 clrf timeout_counter3 |
89 bcf premenu ; clear premenu flag | |
90 bcf menubit ; clear menu flag | 89 bcf menubit ; clear menu flag |
91 clrf last_pressure+0 | 90 clrf last_pressure+0 |
92 clrf last_pressure+1 | 91 clrf last_pressure+1 |
93 bcf is_bailout ; =1: Bailout | 92 bcf is_bailout ; =1: Bailout |
94 bcf ccr_diluent_setup ; Use OC gases for gaslist routine | 93 bcf ccr_diluent_setup ; Use OC gases for gaslist routine |
184 call TFT_debug_output | 183 call TFT_debug_output |
185 call TFT_clock ; update clock | 184 call TFT_clock ; update clock |
186 call timeout_surfmode ; check timeout | 185 call timeout_surfmode ; check timeout |
187 call get_battery_voltage ; get battery voltage | 186 call get_battery_voltage ; get battery voltage |
188 call TFT_update_batt_voltage ; display battery voltage | 187 call TFT_update_batt_voltage ; display battery voltage |
189 call timeout_premenu ; timeout premenu | |
190 call set_dive_modes ; tests if depth>threshold | 188 call set_dive_modes ; tests if depth>threshold |
191 btfss secs,0 ; Every two seconds... | 189 btfss secs,0 ; Every two seconds... |
192 call TFT_temp_surfmode ; Displays temperature | 190 call TFT_temp_surfmode ; Displays temperature |
193 btfss secs,0 ; Every two seconds... | 191 btfss secs,0 ; Every two seconds... |
194 call surfmode_check_for_warnings ; ... check for warnings (and display/update) them | 192 call surfmode_check_for_warnings ; ... check for warnings (and display/update) them |
333 SAFE_2BYTE_COPY amb_pressure,int_I_pres_respiration ; copy surface air pressure to deco routine | 331 SAFE_2BYTE_COPY amb_pressure,int_I_pres_respiration ; copy surface air pressure to deco routine |
334 call deco_calc_wo_deco_step_1_min ; calculate deco in surface mode | 332 call deco_calc_wo_deco_step_1_min ; calculate deco in surface mode |
335 banksel common | 333 banksel common |
336 return | 334 return |
337 | 335 |
338 timeout_premenu: | |
339 btfsc premenu ; is "<Menu" displayed? | |
340 bra timeout_premenu1 ; Yes | |
341 return | |
342 | |
343 timeout_premenu1: | |
344 incf timeout_counter3,F ; Yes... | |
345 movlw d'2' | |
346 cpfsgt timeout_counter3 ; ... longer then premenu_timeout | |
347 return ; No! | |
348 | |
349 bcf premenu ; Yes, so clear "Menu?" and clear pre_menu bit | |
350 | |
351 WIN_SMALL menu_pos_column,menu_pos_row | |
352 WIN_COLOR color_lightblue | |
353 STRCPY_TEXT_PRINT tMenu ; "<Menu" | |
354 call TFT_standard_color | |
355 clrf timeout_counter3 ; Also clear timeout | |
356 bcf switch_left ; and debounce switches | |
357 bcf switch_right | |
358 return | |
359 | |
360 test_switches_surfmode: ; checks switches in surfacemode | 336 test_switches_surfmode: ; checks switches in surfacemode |
361 btfsc switch_right | 337 btfsc switch_right |
362 bra test_switches_surfmode2 | 338 bra test_switches_surfmode2 |
363 btfsc switch_left | 339 btfsc switch_left |
364 bra test_switches_surfmode3 | 340 bra test_switches_surfmode3 |
366 ; No button press | 342 ; No button press |
367 return | 343 return |
368 | 344 |
369 test_switches_surfmode3: | 345 test_switches_surfmode3: |
370 bcf switch_left | 346 bcf switch_left |
371 btfss premenu | |
372 bra test_switches_surfmode4 | |
373 bsf menubit ; Enter Menu! | 347 bsf menubit ; Enter Menu! |
374 return | |
375 | |
376 test_switches_surfmode4: | |
377 WIN_COLOR color_lightblue | |
378 WIN_SMALL view_column,view_row | |
379 STRCPY_TEXT_PRINT tView ;"View" | |
380 WIN_SMALL menu_pos_column,menu_pos_row | |
381 call TFT_standard_color | |
382 WIN_INVERT .1 ; Init new Wordprocessor | |
383 STRCPY_TEXT_PRINT tMenu ;"<Menu" | |
384 WIN_INVERT .0 ; Init new Wordprocessor | |
385 bsf premenu | |
386 clrf timeout_counter2 | |
387 return | 348 return |
388 | 349 |
389 test_switches_surfmode2: | 350 test_switches_surfmode2: |
390 bcf switch_right | 351 bcf switch_right |
391 bsf toggle_customview | 352 bsf toggle_customview |
392 clrf timeout_counter2 ; and reset timeout | 353 clrf timeout_counter2 ; and reset timeout |
393 return | |
394 | |
395 test_switches_surfmode5: | |
396 WIN_SMALL menu_pos_column,menu_pos_row | |
397 WIN_COLOR color_lightblue | |
398 STRCPY_TEXT_PRINT tMenu ;"<Menu" | |
399 call TFT_standard_color | |
400 bcf premenu | |
401 clrf timeout_counter2 | |
402 return | 354 return |
403 | 355 |
404 global timeout_surfmode | 356 global timeout_surfmode |
405 timeout_surfmode: | 357 timeout_surfmode: |
406 movlw timeout_surfacemode ; [s] | 358 movlw timeout_surfacemode ; [s] |