Mercurial > public > hwos_code
comparison src/tft_outputs.asm @ 516:2ef8cf6b320d
NEW: ppO2 blinks in sensor mode when min/max boundaries are hit
Backup diluent change depths in dive mode boot
author | heinrichsweikamp |
---|---|
date | Thu, 03 Aug 2017 16:59:31 +0200 |
parents | 4e6f5c36f4cc |
children | d339c9e1175d |
comparison
equal
deleted
inserted
replaced
515:01c0fbd16025 | 516:2ef8cf6b320d |
---|---|
1861 call TFT_standard_color | 1861 call TFT_standard_color |
1862 btfsc is_bailout ; =1: Bailout | 1862 btfsc is_bailout ; =1: Bailout |
1863 bra TFT_active_setpoint_bail ; Show "Bailout" instead of Setpoint | 1863 bra TFT_active_setpoint_bail ; Show "Bailout" instead of Setpoint |
1864 | 1864 |
1865 rcall TFT_active_setpoint2 ; show setpoint (Non-Inverted in all cases) | 1865 rcall TFT_active_setpoint2 ; show setpoint (Non-Inverted in all cases) |
1866 | 1866 |
1867 btfss setpoint_fallback ; =1: Fallback to SP1 due to external O2 sensor failure | 1867 ; ****** new from R.L.****** |
1868 bra TFT_active_setpoint_diluent ; Done. | 1868 btg blinking_setpoint ; Toggle blink bit... |
1869 btg blinking_setpoint ; Toggle blink bit... | 1869 |
1870 btfss blinking_setpoint ; blink now? | 1870 btfss blinking_setpoint ; blink now? |
1871 bra TFT_active_setpoint_diluent ; Done. | 1871 bra TFT_active_setpoint_diluent ; no - Done. If no blink now, no need to do all checks |
1872 | 1872 |
1873 movlw color_yellow ; Blink in yellow | 1873 btfsc setpoint_fallback ; =1: Fallback to SP1 due to external O2 sensor failure |
1874 call TFT_set_color | 1874 bra TFT_active_setpoint_b ; not clear, so process fallback case |
1875 | |
1876 movff char_I_const_ppO2, lo ; get current ppO2 | |
1877 movff opt_ppO2_max, WREG ; PPO2 Max for MOD calculation and color coding | |
1878 cpfsgt lo ; lo > opt_ppO2_max? | |
1879 Bra TFT_active_setpoint_d ; No ? continue with checking for low ppO2 condition | |
1880 Bra TFT_active_setpoint_e ; Yes ? set up blinking for ppO2 problem case | |
1881 | |
1882 TFT_active_setpoint_d: | |
1883 movff opt_ppO2_min, WREG ; PPO2 min for Sensors and color coding | |
1884 cpfslt lo ; lo < opt_ppO2_min? | |
1885 bra TFT_active_setpoint_diluent ; No ? ppO2 is ok, continue with displaying diluent | |
1886 ;bra TFT_active_setpoint_e ; Yes ? set up blinking for ppO2 problem case | |
1887 | |
1888 TFT_active_setpoint_e: ; set up blinking for ppO2 problem case | |
1889 movlw color_red ; blink in red | |
1890 call TFT_set_color | |
1891 bra TFT_active_setpoint_c ; continue with blinking common part | |
1892 TFT_active_setpoint_b: ; set up blinking for fallback case | |
1893 movlw color_yellow ; blink in yellow | |
1894 call TFT_set_color | |
1895 ; bra TFT_active_setpoint_c ; just for clarity in the code | |
1896 TFT_active_setpoint_c: ; blinking common part | |
1897 ; ****** new from R.L.****** | |
1898 | |
1875 bsf win_invert ; Set invert flag | 1899 bsf win_invert ; Set invert flag |
1876 WIN_STD dm_active_gas_column, dm_active_gas_row | 1900 WIN_STD dm_active_gas_column, dm_active_gas_row |
1877 movff char_I_const_ppO2,lo | 1901 movff char_I_const_ppO2,lo |
1878 clrf hi | 1902 clrf hi |
1879 bsf leftbind | 1903 bsf leftbind |