Mercurial > public > hwos_code
comparison src/ghostwriter.asm @ 656:8af5aefbcdaf default tip
Update to 3.31 beta
| author | heinrichsweikamp |
|---|---|
| date | Thu, 27 Nov 2025 18:32:58 +0100 |
| parents | 75e90cd0c2c3 |
| children |
comparison
equal
deleted
inserted
replaced
| 655:c7b7b8a358cd | 656:8af5aefbcdaf |
|---|---|
| 92 btfsc tr_functions_activated ; TR functions activated? | 92 btfsc tr_functions_activated ; TR functions activated? |
| 93 movlw div_tank ; YES - get divisor for tank data | 93 movlw div_tank ; YES - get divisor for tank data |
| 94 movwf divisor_tank ; initialize divisor | 94 movwf divisor_tank ; initialize divisor |
| 95 ENDIF | 95 ENDIF |
| 96 | 96 |
| 97 IFDEF _external_sensor | 97 IFDEF _external_sensor_eccr |
| 98 movlw div_ppo2_sensors ; get divisor for ppO2 sensor | 98 movlw div_ppo2_sensors ; get divisor for ppO2 sensor |
| 99 movwf divisor_ppo2_sensors ; initialize divisor by default | 99 movwf divisor_ppo2_sensors ; initialize divisor by default |
| 100 btfsc FLAG_ccr_mode ; in CCR mode? | 100 btfsc FLAG_ccr_mode ; in CCR mode? |
| 101 bra init_recording_params_2 ; YES - keep divisor | 101 bra init_recording_params_2 ; YES - keep divisor |
| 102 btfsc FLAG_pscr_mode ; NO - in pSCR mode? | 102 btfsc FLAG_pscr_mode ; NO - in pSCR mode? |
| 153 decfsz divisor_supersat,W ; check divisor if it will become 0, dump decremented value to WREG | 153 decfsz divisor_supersat,W ; check divisor if it will become 0, dump decremented value to WREG |
| 154 bra check_extended3 ; NO - skip | 154 bra check_extended3 ; NO - skip |
| 155 movlw infolength_gf ; YES - get length of extra data | 155 movlw infolength_gf ; YES - get length of extra data |
| 156 addwf ProfileFlagByte,F ; - add to ProfileFlagByte | 156 addwf ProfileFlagByte,F ; - add to ProfileFlagByte |
| 157 check_extended3: | 157 check_extended3: |
| 158 IFDEF _external_sensor | 158 IFDEF _external_sensor_eccr |
| 159 decfsz divisor_ppo2_sensors,W ; check divisor if it will become 0, dump decremented value to WREG | 159 decfsz divisor_ppo2_sensors,W ; check divisor if it will become 0, dump decremented value to WREG |
| 160 bra check_extended4 ; NO - skip | 160 bra check_extended4 ; NO - skip |
| 161 movlw infolength_ppo2_sensors ; YES - get length of extra data | 161 movlw infolength_ppo2_sensors ; YES - get length of extra data |
| 162 addwf ProfileFlagByte,F ; - add to ProfileFlagByte | 162 addwf ProfileFlagByte,F ; - add to ProfileFlagByte |
| 163 ENDIF | 163 ENDIF |
| 311 rcall store_dive_supersat ; YES - store supersaturation | 311 rcall store_dive_supersat ; YES - store supersaturation |
| 312 store_dive_data4c: | 312 store_dive_data4c: |
| 313 btfsc divisor_supersat,7 ; did the timer under-run? | 313 btfsc divisor_supersat,7 ; did the timer under-run? |
| 314 clrf divisor_supersat ; YES - reset timer | 314 clrf divisor_supersat ; YES - reset timer |
| 315 | 315 |
| 316 IFDEF _external_sensor | 316 IFDEF _external_sensor_eccr |
| 317 decfsz divisor_ppo2_sensors,F ; decrement timer, did it became 0 ? | 317 decfsz divisor_ppo2_sensors,F ; decrement timer, did it became 0 ? |
| 318 bra store_dive_data4d ; NO - skip | 318 bra store_dive_data4d ; NO - skip |
| 319 rcall store_dive_ppO2_sensors ; YES - store sensor data | 319 rcall store_dive_ppO2_sensors ; YES - store sensor data |
| 320 store_dive_data4d: | 320 store_dive_data4d: |
| 321 btfsc divisor_ppo2_sensors,7 ; did the timer under-run? | 321 btfsc divisor_ppo2_sensors,7 ; did the timer under-run? |
| 382 movlw div_decoplan ; YES - get sampling rate | 382 movlw div_decoplan ; YES - get sampling rate |
| 383 movwf divisor_decoplan ; - reload timer | 383 movwf divisor_decoplan ; - reload timer |
| 384 return ; - done | 384 return ; - done |
| 385 | 385 |
| 386 | 386 |
| 387 IFDEF _external_sensor | 387 IFDEF _external_sensor_eccr |
| 388 store_dive_ppO2_sensors: | 388 store_dive_ppO2_sensors: |
| 389 FLASH_CC_PROFILE sensor1_ppO2 ; store sensor 1 ppO2 (in 0.01 bar steps) | 389 FLASH_CC_PROFILE sensor1_ppO2 ; store sensor 1 ppO2 (in 0.01 bar steps) |
| 390 SMOVII sensor1_mv,mpr ; ISR-safe 2 byte copy of o2_mv_sensor | 390 SMOVII sensor1_mv,mpr ; ISR-safe 2 byte copy of o2_mv_sensor |
| 391 FLASH_II_PROFILE mpr ; store sensor 1 mV | 391 FLASH_II_PROFILE mpr ; store sensor 1 mV |
| 392 | 392 |
| 761 ; -> the deco distance concept is disposed of, so just store a hard-coded zero | 761 ; -> the deco distance concept is disposed of, so just store a hard-coded zero |
| 762 ; --> so just leave the zero written during header initialization in place | 762 ; --> so just leave the zero written during header initialization in place |
| 763 ;clrf WREG | 763 ;clrf WREG |
| 764 ;MOVCC WREG,header_buffer+index_decodistance | 764 ;MOVCC WREG,header_buffer+index_decodistance |
| 765 | 765 |
| 766 IFDEF _external_sensor | 766 IFDEF _external_sensor_eccr |
| 767 ; store last HUD data (ISR-safe 3 byte copy) | 767 ; store last HUD data (ISR-safe 3 byte copy) |
| 768 SMOVTT hud_status_byte,header_buffer+index_hud_data | 768 SMOVTT hud_status_byte,header_buffer+index_hud_data |
| 769 ELSE | 769 ELSE |
| 770 ; just leave the zero bytes in place | 770 ; just leave the zero bytes in place |
| 771 ENDIF | 771 ENDIF |
| 946 FLASH_LIT_PROFILE div_gf ; get sampling rate | 946 FLASH_LIT_PROFILE div_gf ; get sampling rate |
| 947 | 947 |
| 948 FLASH_LIT_PROFILE .3 ; type: ppO2 sensor data | 948 FLASH_LIT_PROFILE .3 ; type: ppO2 sensor data |
| 949 FLASH_LIT_PROFILE infolength_ppo2_sensors ; get size of recording data | 949 FLASH_LIT_PROFILE infolength_ppo2_sensors ; get size of recording data |
| 950 movlw .0 ; default to no ppO2 data | 950 movlw .0 ; default to no ppO2 data |
| 951 IFDEF _external_sensor | 951 IFDEF _external_sensor_eccr |
| 952 btfsc FLAG_ccr_mode ; in CCR mode? | 952 btfsc FLAG_ccr_mode ; in CCR mode? |
| 953 movlw div_ppo2_sensors ; YES - get sampling rate | 953 movlw div_ppo2_sensors ; YES - get sampling rate |
| 954 btfsc FLAG_pscr_mode ; in pSCR mode? | 954 btfsc FLAG_pscr_mode ; in pSCR mode? |
| 955 movlw div_ppo2_sensors ; YES - get sampling rate | 955 movlw div_ppo2_sensors ; YES - get sampling rate |
| 956 ENDIF | 956 ENDIF |
