Mercurial > public > hwos_code
comparison src/divemode.asm @ 255:ad62dff7739a
add bearing option to compass
author | heinrichsweikamp |
---|---|
date | Mon, 23 Mar 2015 17:07:57 +0100 |
parents | 5fe7aff622f3 |
children | 5b4ef0b9090d |
comparison
equal
deleted
inserted
replaced
254:5fe7aff622f3 | 255:ad62dff7739a |
---|---|
1046 call menuview_toggle_reset | 1046 call menuview_toggle_reset |
1047 return | 1047 return |
1048 | 1048 |
1049 divemode_option7: | 1049 divemode_option7: |
1050 ; Store heading for compass view | 1050 ; Store heading for compass view |
1051 movff compass_heading_shown+0,compass_bearing+0 | |
1052 movff compass_heading_shown+1,compass_bearing+1 | |
1053 bsf compass_bearing_set ; set flag | |
1051 call menuview_toggle_reset ; Done. | 1054 call menuview_toggle_reset ; Done. |
1052 return | 1055 return |
1053 | |
1054 | 1056 |
1055 divemode_simulator_check_limits: | 1057 divemode_simulator_check_limits: |
1056 ; Check limits (150m and 0m) | 1058 ; Check limits (150m and 0m) |
1057 movlw LOW d'16000' ; Compare to 16bar=16000mbar (150m). | 1059 movlw LOW d'16000' ; Compare to 16bar=16000mbar (150m). |
1058 subwf sim_pressure+0,W | 1060 subwf sim_pressure+0,W |
1299 call I2C_sleep_compass ; Stop compass | 1301 call I2C_sleep_compass ; Stop compass |
1300 | 1302 |
1301 clrf WREG | 1303 clrf WREG |
1302 movff WREG,max_pressure+0 ; clear some variables | 1304 movff WREG,max_pressure+0 ; clear some variables |
1303 movff WREG,max_pressure+1 | 1305 movff WREG,max_pressure+1 |
1306 movff WREG,compass_bearing+0 | |
1307 movff WREG,compass_bearing+1 | |
1308 | |
1309 bcf compass_bearing_set | |
1304 | 1310 |
1305 bcf use_agf ; Start with normal GF set | 1311 bcf use_agf ; Start with normal GF set |
1306 bcf divemode_menu ; clear divemode menu flag | 1312 bcf divemode_menu ; clear divemode menu flag |
1307 movlw d'1' | 1313 movlw d'1' |
1308 movwf apnoe_max_pressure+0 | 1314 movwf apnoe_max_pressure+0 |