comparison src/tft_outputs.asm @ 126:9e856337b225

fix depth<0m display, ceiling
author heinrichsweikamp
date Mon, 30 Jun 2014 10:58:02 +0200
parents 40ff64d60054
children c935f7fbd39c
comparison
equal deleted inserted replaced
125:53409476a05f 126:9e856337b225
2469 bcf leftbind 2469 bcf leftbind
2470 movlw .3 ; limit to three chars 2470 movlw .3 ; limit to three chars
2471 call TFT_fillup_with_spaces ; Fillup FSR2 with spaces (Total string length in #WREG) 2471 call TFT_fillup_with_spaces ; Fillup FSR2 with spaces (Total string length in #WREG)
2472 STRCAT_PRINT "" ; Display feet 2472 STRCAT_PRINT "" ; Display feet
2473 return 2473 return
2474 2474
2475 depth_less_0.3mtr_feet: 2475 depth_less_0.3mtr_feet:
2476 STRCAT_PRINT "0 " ; manual zero 2476 STRCAT_PRINT "0 " ; manual zero
2477 return 2477 return
2478 2478
2479 TFT_depth_metric: 2479 TFT_depth_metric:
2520 output_16 ; Full meters in Big font 2520 output_16 ; Full meters in Big font
2521 bcf leftbind 2521 bcf leftbind
2522 bra tft_depth3 2522 bra tft_depth3
2523 2523
2524 tft_depth2: 2524 tft_depth2:
2525 WIN_LARGE depth_column,depth_row
2526 STRCAT "0" 2525 STRCAT "0"
2527 2526
2528 tft_depth3: 2527 tft_depth3:
2529 STRCAT_PRINT "" ; Display full meters 2528 STRCAT_PRINT "" ; Display full meters
2530 2529
2532 WIN_MEDIUM depth_dm_column,depth_dm_row 2531 WIN_MEDIUM depth_dm_column,depth_dm_row
2533 TFT_color_code warn_depth ; Color-code the output 2532 TFT_color_code warn_depth ; Color-code the output
2534 2533
2535 SAFE_2BYTE_COPY rel_pressure, lo 2534 SAFE_2BYTE_COPY rel_pressure, lo
2536 call adjust_depth_with_salinity ; computes salinity setting into lo:hi [mbar] 2535 call adjust_depth_with_salinity ; computes salinity setting into lo:hi [mbar]
2537 2536
2538 PUTC "." 2537 PUTC "."
2539 movlw HIGH d'30' ; Display 0.0m if lower then 30cm 2538 movlw HIGH d'30' ; Display 0.0m if lower then 30cm
2540 movwf sub_a+1 2539 movwf sub_a+1
2541 movlw LOW d'30' 2540 movlw LOW d'30'
2542 movwf sub_a+0 2541 movwf sub_a+0