Mercurial > public > mk2
comparison code_part1/OSTC_code_asm_part1/sleepmode.asm @ 398:ab962c4b19d6
Fixing issue 50, correct "Bar" to "bar" in texts and comments
author | heinrichsweikamp |
---|---|
date | Sun, 26 Jun 2011 12:24:54 +0200 |
parents | 88660a400338 |
children | af2894e5cda4 |
comparison
equal
deleted
inserted
replaced
396:0386c7e1374a | 398:ab962c4b19d6 |
---|---|
84 movff last_surfpressure_15min+0,last_surfpressure_30min+0 ; save older airpressure | 84 movff last_surfpressure_15min+0,last_surfpressure_30min+0 ; save older airpressure |
85 movff last_surfpressure_15min+1,last_surfpressure_30min+1 ; save older airpressure | 85 movff last_surfpressure_15min+1,last_surfpressure_30min+1 ; save older airpressure |
86 SAFE_2BYTE_COPY amb_pressure, last_surfpressure_15min ; save new airpressure | 86 SAFE_2BYTE_COPY amb_pressure, last_surfpressure_15min ; save new airpressure |
87 | 87 |
88 GETCUSTOM15 d'7' ; loads max_sufpressure into lo, hi | 88 GETCUSTOM15 d'7' ; loads max_sufpressure into lo, hi |
89 movff lo,sub_a+0 ; max. "allowed" airpressure in mBar | 89 movff lo,sub_a+0 ; max. "allowed" airpressure in mbar |
90 movff hi,sub_a+1 | 90 movff hi,sub_a+1 |
91 movff last_surfpressure_15min+0,sub_b+0 | 91 movff last_surfpressure_15min+0,sub_b+0 |
92 movff last_surfpressure_15min+1,sub_b+1 | 92 movff last_surfpressure_15min+1,sub_b+1 |
93 call sub16 ; sub_c = sub_a - sub_b | 93 call sub16 ; sub_c = sub_a - sub_b |
94 btfss neg_flag ; Is 1080mbar < amb_pressure ? | 94 btfss neg_flag ; Is 1080mbar < amb_pressure ? |
95 bra onemin_sleep2 ; NO: current airpressure is lower then "allowed" airpressure, ok! | 95 bra onemin_sleep2 ; NO: current airpressure is lower then "allowed" airpressure, ok! |
96 | 96 |
97 ; not ok! Overwrite with max. "allowed" airpressure | 97 ; not ok! Overwrite with max. "allowed" airpressure |
98 GETCUSTOM15 d'7' ; loads max_sufpressure into lo, hi | 98 GETCUSTOM15 d'7' ; loads max_sufpressure into lo, hi |
99 movff lo,last_surfpressure_15min+0 ; max. "allowed" airpressure in mBar | 99 movff lo,last_surfpressure_15min+0 ; max. "allowed" airpressure in mbar |
100 movff hi,last_surfpressure_15min+1 ; max. "allowed" airpressure in mBar | 100 movff hi,last_surfpressure_15min+1 ; max. "allowed" airpressure in mbar |
101 | 101 |
102 onemin_sleep2: | 102 onemin_sleep2: |
103 SAFE_2BYTE_COPY amb_pressure, int_I_pres_respiration ; LOW copy pressure to deco routine | 103 SAFE_2BYTE_COPY amb_pressure, int_I_pres_respiration ; LOW copy pressure to deco routine |
104 GETCUSTOM8 d'11' ; Saturation multiplier % | 104 GETCUSTOM8 d'11' ; Saturation multiplier % |
105 movff WREG,char_I_saturation_multiplier | 105 movff WREG,char_I_saturation_multiplier |