Mercurial > public > hwos_code
comparison src/simulator.asm @ 298:2fe34fc0e2ae
new submenu for gas consumption, show actual mix instead of GAS1-GAS5 in deco planner
author | heinrichsweikamp |
---|---|
date | Sun, 31 May 2015 16:19:56 +0200 |
parents | af13a18a233b |
children | fec5eec4c8b7 |
comparison
equal
deleted
inserted
replaced
297:65f6a7bfc205 | 298:2fe34fc0e2ae |
---|---|
18 #include "start.inc" | 18 #include "start.inc" |
19 #include "divemode.inc" | 19 #include "divemode.inc" |
20 #include "math.inc" | 20 #include "math.inc" |
21 #include "eeprom_rs232.inc" | 21 #include "eeprom_rs232.inc" |
22 #include "tft_outputs.inc" | 22 #include "tft_outputs.inc" |
23 #include "gaslist.inc" | |
23 | 24 |
24 gui CODE | 25 gui CODE |
25 | 26 |
26 extern deco_clear_tissue | 27 extern deco_clear_tissue |
27 extern deco_push_tissues_to_vault | 28 extern deco_push_tissues_to_vault |
756 | 757 |
757 WIN_LEFT .80 ; Set column | 758 WIN_LEFT .80 ; Set column |
758 call TFT_standard_color | 759 call TFT_standard_color |
759 | 760 |
760 simulator_show_decoplan5_loop: | 761 simulator_show_decoplan5_loop: |
762 movff wait_temp,PRODL ; Copy to PRODL first | |
761 incf wait_temp,F ; Increment gas # | 763 incf wait_temp,F ; Increment gas # |
762 | 764 lfsr FSR2,buffer |
763 STRCPY_TEXT tGas ; Print Gas number | 765 bsf short_gas_decriptions |
764 bsf leftbind | 766 bsf divemode ; Tweak "customview_show_mix:" |
765 movff wait_temp,lo | 767 call gaslist_strcat_gas ; Input: PRODL : gas number (0..4), Output: "Nxlo", "Txlo/hi", "Air" or "O2" into Postinc2 |
766 output_8 | 768 bcf divemode ; Tweak "customview_show_mix:" |
767 | 769 |
768 movlw .25 | 770 movlw .25 |
769 addwf waitms_temp,F ; Increase row position | 771 addwf waitms_temp,F ; Increase row position |
770 movff waitms_temp,win_top ; Set Row | 772 movff waitms_temp,win_top ; Set Row |
771 | 773 |
777 movf lo,W ; == 65535 (saturated ?) | 779 movf lo,W ; == 65535 (saturated ?) |
778 andwf hi,W | 780 andwf hi,W |
779 incf WREG | 781 incf WREG |
780 bnz simulator_show_decoplan5_2 | 782 bnz simulator_show_decoplan5_2 |
781 call TFT_attention_color | 783 call TFT_attention_color |
782 STRCAT_PRINT ": xxxx.x" | 784 STRCAT_PRINT ":xxxx.x" |
783 call TFT_standard_color | 785 call TFT_standard_color |
784 bra simulator_show_decoplan5_1 | 786 bra simulator_show_decoplan5_1 |
785 | 787 |
786 simulator_show_decoplan5_2: | 788 simulator_show_decoplan5_2: |
787 STRCAT ": " | 789 PUTC ":" |
788 | |
789 bsf leftbind | 790 bsf leftbind |
790 output_16 ; No decimal anymore. | 791 output_16 ; No decimal anymore. |
791 bcf leftbind | 792 bcf leftbind |
792 STRCAT_PRINT "" ; No unit: can be bars or litters. | 793 STRCAT_PRINT "" ; No unit: can be bars or litters. |
793 | 794 |