comparison code_part1/OSTC_code_asm_part1/pled_outputs.asm @ 289:6d8a2550c9ea

Fix zero-depth gas color in de-activation menu.
author JeanDo
date Thu, 21 Apr 2011 20:09:09 +0200
parents 5f2fe81fde9f
children 4dbff2aa31ee
comparison
equal deleted inserted replaced
288:9feb224f6871 289:6d8a2550c9ea
2530 PLED_decoplan_99: 2530 PLED_decoplan_99:
2531 bsf last_ceiling_gf_shown ; Nothing more in table to display. 2531 bsf last_ceiling_gf_shown ; Nothing more in table to display.
2532 rcall PLED_decoplan_clear_bottom ; Clear from next line 2532 rcall PLED_decoplan_clear_bottom ; Clear from next line
2533 return 2533 return
2534 ;----------------------------------------------------------------------------- 2534 ;-----------------------------------------------------------------------------
2535 2535 ; Toggle gas activity flag during dive.
2536 ;
2537 ; Input: sorted_gaslist_active
2538 ; Gaslist from eeprom[2...]
2539 ;
2540 ; Output: sorted_gaslist_active
2541 ;
2542 ; Note: Gas with a zero depth cannot be used in deco simulation, hence
2543 ; should not be displayed as selected here...
2544 ;
2536 PLED_de_activelist: ; show (de)active gaslist 2545 PLED_de_activelist: ; show (de)active gaslist
2537 call PLED_standard_color 2546 call PLED_standard_color
2538 DISPLAYTEXT .254 ; Close 2547 DISPLAYTEXT .254 ; Close
2539 2548
2540 WIN_LEFT .100 2549 WIN_LEFT .100
2574 2583
2575 call read_eeprom ; get byte (stored in EEDATA) 2584 call read_eeprom ; get byte (stored in EEDATA)
2576 movff EEDATA,lo ; copy to lo 2585 movff EEDATA,lo ; copy to lo
2577 output_8 ; outputs into Postinc2! 2586 output_8 ; outputs into Postinc2!
2578 2587
2588 movf lo,w ; Gas with a zero depth
2589 bz PLED_de_activelist_grey ; should be displayed inactive.
2590
2579 ; Check if gas needs to be greyed-out (inactive) 2591 ; Check if gas needs to be greyed-out (inactive)
2580 movff sorted_gaslist_active,EEDATA ; Get flag register 2592 movff sorted_gaslist_active,EEDATA ; Get flag register
2581 movff hi,lo ; copy gas number 2593 movff hi,lo ; copy gas number
2582 PLED_de_activelist_loop1: 2594 PLED_de_activelist_loop1:
2583 rrcf EEDATA ; roll flags into carry 2595 rrcf EEDATA ; roll flags into carry
2584 decfsz lo,F ; max. 5 times... 2596 decfsz lo,F ; max. 5 times...
2585 bra PLED_de_activelist_loop1 2597 bra PLED_de_activelist_loop1
2586 2598 bc PLED_de_activelist_white
2599
2600 PLED_de_activelist_grey: ; grey out inactive gases!
2587 movlw color_grey 2601 movlw color_grey
2588 btfss STATUS,C ; test carry 2602 call PLED_set_color
2589 call PLED_set_color ; grey out inactive gases! 2603
2590 2604 PLED_de_activelist_white:
2591 call word_processor 2605 call word_processor
2592 call PLED_standard_color 2606 call PLED_standard_color
2593 2607
2594 movlw d'5' ; list all five gases 2608 movlw d'5' ; list all five gases
2595 cpfseq hi ; All gases shown? 2609 cpfseq hi ; All gases shown?