Mercurial > public > hwos_code
comparison src/tft_outputs.asm @ 530:d36f9fca10ae
2.20beta release
BUGFIX: Minor dive mode layout fixes in CCR Mode
CHANGE: Minor German language fixes
NEW: Warning for Diluent beeing out of safe ppO2 range in CCR modes
NEW: New Customview 9 in OSTC cR or OSTC3 shows mV readings after Sensor calibration
author | heinrichsweikamp |
---|---|
date | Thu, 17 Aug 2017 13:20:03 +0200 |
parents | 0d1cda9f2d43 |
children | dfac393b2199 |
comparison
equal
deleted
inserted
replaced
529:08d7eb26665c | 530:d36f9fca10ae |
---|---|
863 WIN_BOX_BLACK dm_warning_icon_row, dm_warning_icon_bot, dm_warning_icon_column, dm_warning_icon_rgt ; top, bottom, left, right | 863 WIN_BOX_BLACK dm_warning_icon_row, dm_warning_icon_bot, dm_warning_icon_column, dm_warning_icon_rgt ; top, bottom, left, right |
864 return | 864 return |
865 | 865 |
866 global TFT_display_deko_mask | 866 global TFT_display_deko_mask |
867 TFT_display_deko_mask: | 867 TFT_display_deko_mask: |
868 btfsc divemode_menu ; Is the dive mode menu shown? | |
869 return ; Yes, return | |
870 | |
868 rcall TFT_clear_decoarea | 871 rcall TFT_clear_decoarea |
869 WIN_STD dm_tts_text_column, dm_tts_text_row | 872 WIN_STD dm_tts_text_column, dm_tts_text_row |
870 if dm_offset != 0 | 873 if dm_offset != 0 |
871 call TFT_divemask_color | 874 call TFT_divemask_color |
872 else | 875 else |
942 bra TFT_display_deko2 ; Yes | 945 bra TFT_display_deko2 ; Yes |
943 ; No, clear output and return | 946 ; No, clear output and return |
944 call TFT_standard_color | 947 call TFT_standard_color |
945 WIN_SMALL dm_cust_dstop_4th_stop_column,dm_cust_dstop_4th_stop_row | 948 WIN_SMALL dm_cust_dstop_4th_stop_column,dm_cust_dstop_4th_stop_row |
946 STRCPY_PRINT " --- " | 949 STRCPY_PRINT " --- " |
947 WIN_BOX_BLACK dm_cust_dstop_2nd_stop_row, dm_customview_bot, dm_cust_dstop_2nd_stop_column, dm_cust_dstop_4th_stop_column ; top, bottom, left, right | 950 WIN_BOX_BLACK dm_cust_dstop_2nd_stop_row, dm_customview_bot-.1, dm_cust_dstop_2nd_stop_column, dm_cust_dstop_4th_stop_column ; top, bottom, left, right |
948 WIN_BOX_BLACK dm_cust_dstop_5th_stop_row, dm_customview_bot, dm_cust_dstop_5th_stop_column, dm_cust_dstop_6th_stop_column ; top, bottom, left, right | 951 WIN_BOX_BLACK dm_cust_dstop_5th_stop_row, dm_customview_bot, dm_cust_dstop_5th_stop_column, dm_cust_dstop_6th_stop_column ; top, bottom, left, right |
949 WIN_BOX_BLACK dm_cust_dstop_6th_stop_row, dm_customview_bot, dm_cust_dstop_6th_stop_column, .159 ; top, bottom, left, right | 952 WIN_BOX_BLACK dm_cust_dstop_6th_stop_row, dm_customview_bot, dm_cust_dstop_6th_stop_column, .159 ; top, bottom, left, right |
950 return | 953 return |
951 TFT_display_deko2: | 954 TFT_display_deko2: |
952 WIN_SMALL dm_cust_dstop_2nd_stop_column, dm_cust_dstop_2nd_stop_row | 955 WIN_SMALL dm_cust_dstop_2nd_stop_column, dm_cust_dstop_2nd_stop_row |
958 STRCAT_PRINT "'" | 961 STRCAT_PRINT "'" |
959 movff char_O_deco_depth+2,lo | 962 movff char_O_deco_depth+2,lo |
960 tstfsz lo ; Show another stop? | 963 tstfsz lo ; Show another stop? |
961 bra TFT_display_deko3 ; Yes | 964 bra TFT_display_deko3 ; Yes |
962 ; No, clear output and return | 965 ; No, clear output and return |
963 WIN_BOX_BLACK dm_cust_dstop_3rd_stop_row, dm_customview_bot, dm_cust_dstop_2nd_stop_column, dm_cust_dstop_4th_stop_column ; top, bottom, left, right | 966 WIN_BOX_BLACK dm_cust_dstop_3rd_stop_row, dm_customview_bot-.1, dm_cust_dstop_2nd_stop_column, dm_cust_dstop_4th_stop_column ; top, bottom, left, right |
964 WIN_BOX_BLACK dm_cust_dstop_4th_stop_row, dm_customview_bot, dm_cust_dstop_4th_stop_column, .159 ; top, bottom, left, right | 967 WIN_BOX_BLACK dm_cust_dstop_4th_stop_row, dm_customview_bot, dm_cust_dstop_4th_stop_column, .159 ; top, bottom, left, right |
965 return | 968 return |
966 | 969 |
967 TFT_display_deko3: | 970 TFT_display_deko3: |
968 WIN_SMALL dm_cust_dstop_3rd_stop_column, dm_cust_dstop_3rd_stop_row | 971 WIN_SMALL dm_cust_dstop_3rd_stop_column, dm_cust_dstop_3rd_stop_row |
1429 output_16dp .3 ; x.xx bar | 1432 output_16dp .3 ; x.xx bar |
1430 STRCAT_PRINT "" | 1433 STRCAT_PRINT "" |
1431 TFT_surface_sensor6: | 1434 TFT_surface_sensor6: |
1432 bcf leftbind | 1435 bcf leftbind |
1433 goto TFT_standard_color; and return... | 1436 goto TFT_standard_color; and return... |
1434 | 1437 |
1438 global TFT_sensor_mV | |
1439 TFT_sensor_mV: | |
1440 call TFT_standard_color | |
1441 bsf leftbind | |
1442 WIN_SMALL surf_mV_sensor_column,surf_mV_sensor1_row | |
1443 movff o2_mv_sensor1+0,lo ; in 0.1mV steps | |
1444 movff o2_mv_sensor1+1,hi ; in 0.1mV steps | |
1445 STRCAT "1: " | |
1446 output_16dp .4 ; xxx.y mV | |
1447 STRCAT_PRINT "mV " | |
1448 | |
1449 WIN_SMALL surf_mV_sensor_column,surf_mV_sensor2_row | |
1450 movff o2_mv_sensor2+0,lo ; in 0.1mV steps | |
1451 movff o2_mv_sensor2+1,hi ; in 0.1mV steps | |
1452 STRCAT "2: " | |
1453 output_16dp .4 ; xxx.y mV | |
1454 STRCAT_PRINT "mV " | |
1455 | |
1456 WIN_SMALL surf_mV_sensor_column,surf_mV_sensor3_row | |
1457 movff o2_mv_sensor3+0,lo ; in 0.1mV steps | |
1458 movff o2_mv_sensor3+1,hi ; in 0.1mV steps | |
1459 STRCAT "3: " | |
1460 output_16dp .4 ; xxx.y mV | |
1461 STRCAT_PRINT "mV " | |
1462 bcf leftbind | |
1463 goto TFT_standard_color ; and return... | |
1464 | |
1435 global TFT_menu_hud | 1465 global TFT_menu_hud |
1436 TFT_menu_hud: ; Yes, update HUD data | 1466 TFT_menu_hud: ; Yes, update HUD data |
1437 call compute_ppo2 ; compute mv_sensorX and ppo2_sensorX arrays | 1467 call compute_ppo2 ; compute mv_sensorX and ppo2_sensorX arrays |
1438 call TFT_attention_color ; show in yellow | 1468 call TFT_attention_color ; show in yellow |
1439 bsf leftbind | 1469 bsf leftbind |
3584 TFT_sensor_check_mask: | 3614 TFT_sensor_check_mask: |
3585 call TFT_divemask_color | 3615 call TFT_divemask_color |
3586 WIN_TINY dm_custom_s_check_text_column, dm_custom_s_check_text_row | 3616 WIN_TINY dm_custom_s_check_text_column, dm_custom_s_check_text_row |
3587 STRCPY_TEXT_PRINT tSensorCheck | 3617 STRCPY_TEXT_PRINT tSensorCheck |
3588 WIN_TINY dm_custom_ppO2_text_column, dm_custom_s_check_text_row | 3618 WIN_TINY dm_custom_ppO2_text_column, dm_custom_s_check_text_row |
3589 STRCPY_PRINT "ppO2(O2)" | 3619 STRCPY_TEXT_PRINT tppO2O2 |
3590 WIN_TINY dm_custom_ppDil_text_column, dm_custom_s_check_text_row | 3620 WIN_TINY dm_custom_ppDil_text_column, dm_custom_s_check_text_row |
3591 STRCPY_PRINT "ppO2(Dil)" | 3621 STRCPY_TEXT_PRINT tppO2Dil |
3592 return | 3622 return |
3593 | 3623 |
3594 global TFT_sensor_check ; Show ppO2 of O2 and Diluent | 3624 global TFT_sensor_check ; Show ppO2 of O2 and Diluent |
3595 TFT_sensor_check: | 3625 TFT_sensor_check: |
3596 ; Show ppO2 of O2 in this depth | 3626 ; Show ppO2 of O2 in this depth |
3852 | 3882 |
3853 global TFT_mask_ppo2 | 3883 global TFT_mask_ppo2 |
3854 TFT_mask_ppo2: | 3884 TFT_mask_ppo2: |
3855 call TFT_divemask_color | 3885 call TFT_divemask_color |
3856 WIN_TINY dm_custom_ceiling_ppo2_column, dm_custom_ceiling_text_row | 3886 WIN_TINY dm_custom_ceiling_ppo2_column, dm_custom_ceiling_text_row |
3857 STRCPY_TEXT_PRINT tppO2 | 3887 |
3888 btfss FLAG_ccr_mode | |
3889 bra TFT_mask_ppo2a ; not in CC mode | |
3890 btfsc is_bailout | |
3891 bra TFT_mask_ppo2a ; in CC mode but in bailout | |
3892 STRCPY_TEXT_PRINT tppO2Dil ; in CC mode and not bailout | |
3893 goto TFT_standard_color ; and return... | |
3894 | |
3895 TFT_mask_ppo2a: | |
3896 | |
3897 STRCPY_TEXT_PRINT tppO2 ; in all other modes | |
3858 goto TFT_standard_color; and return... | 3898 goto TFT_standard_color; and return... |
3859 | 3899 |
3860 global TFT_display_ppo2_val | 3900 global TFT_display_ppo2_val |
3861 TFT_display_ppo2_val: | 3901 TFT_display_ppo2_val: |
3862 btfss FLAG_pscr_mode | 3902 btfss FLAG_pscr_mode |
3905 TFT_display_ppo2: ; Show ppO2 (ppO2 stored in xC, in mbar!) | 3945 TFT_display_ppo2: ; Show ppO2 (ppO2 stored in xC, in mbar!) |
3906 rcall TFT_warning_set_window ; Sets the row and column for the current warning | 3946 rcall TFT_warning_set_window ; Sets the row and column for the current warning |
3907 tstfsz WREG ; Is there room for the warning? | 3947 tstfsz WREG ; Is there room for the warning? |
3908 return ; No | 3948 return ; No |
3909 call TFT_warning_set_window_com | 3949 call TFT_warning_set_window_com |
3910 TFT_color_code warn_ppo2 ; Color-code output (ppO2 stored in xC) | 3950 TFT_color_code warn_ppo2 ; Color-code output (ppO2 stored in xC) |
3911 STRCPY_TEXT tppO2 ; ppO2: | 3951 |
3952 btfss FLAG_ccr_mode ; new code to conditionally name the warning ppO2: or Dil: | |
3953 bra TFT_display_ppo2_none_ccr ; ppO2 warning text | |
3954 btfsc is_bailout | |
3955 bra TFT_display_ppo2_none_ccr ; ccr-mode but in bailout, ppO2 warning text again | |
3956 ; ccr-mode and no bailout | |
3957 STRCPY_TEXT tdil ; "Dil:" | |
3958 bra TFT_display_ppo2_cont | |
3959 | |
3960 TFT_display_ppo2_none_ccr: | |
3961 STRCPY_TEXT tppO2 ; "ppO2:" | |
3962 TFT_display_ppo2_cont: | |
3912 ; hijacking neg_flag_velocity to know where the value is displayed | 3963 ; hijacking neg_flag_velocity to know where the value is displayed |
3913 bcf neg_flag_velocity | 3964 bcf neg_flag_velocity |
3914 TFT_display_ppo2_com: | 3965 TFT_display_ppo2_com: |
3915 ; Check very high ppO2 manually | 3966 ; Check very high ppO2 manually |
3916 tstfsz xC+2 ; char_I_O2_ratio * p_amb/10 > 65536, ppO2>6,55bar? | 3967 tstfsz xC+2 ; char_I_O2_ratio * p_amb/10 > 65536, ppO2>6,55bar? |