comparison src/tft_outputs.asm @ 471:9edb1359ce43

NEW: New Customview 11 in dive mode shows ppO2, EAD/END and CNS CHANGE: Customview 4 shows Clock, Battery Information and Tissue Information
author heinrichsweikamp
date Sun, 11 Dec 2016 14:43:56 +0100
parents 7f4c3b2e6bb7
children 4fdf6886004b
comparison
equal deleted inserted replaced
470:81faca166e1b 471:9edb1359ce43
3325 WIN_STD dm_custom_currentgf_column, dm_custom_currentgf_row 3325 WIN_STD dm_custom_currentgf_column, dm_custom_currentgf_row
3326 output_8 3326 output_8
3327 STRCAT_PRINT "%" 3327 STRCAT_PRINT "%"
3328 return 3328 return
3329 3329
3330 global TFT_ead_end_tissues_clock_mask ; Setup Mask 3330 global TFT_battinfo_tissues_clock_mask ; Setup Mask
3331 TFT_ead_end_tissues_clock_mask: 3331 TFT_battinfo_tissues_clock_mask:
3332 ; The mask 3332 ; The mask
3333 ; Put three columns at HUD positions
3333 call TFT_divemask_color 3334 call TFT_divemask_color
3334 btfsc FLAG_apnoe_mode ; In Apnoe mode? 3335 btfsc FLAG_apnoe_mode ; In Apnoe mode?
3335 bra TFT_ead_end_tissues_clock_mask2 ; Yes 3336 bra TFT_battinfo_tissues_clock_mask2 ; Yes
3336 btfsc FLAG_gauge_mode ; In Gauge mode? 3337 btfsc FLAG_gauge_mode ; In Gauge mode?
3337 bra TFT_ead_end_tissues_clock_mask2 ; Yes 3338 bra TFT_battinfo_tissues_clock_mask2 ; Yes
3338 ; Put three columns at HUD positions
3339 WIN_TINY dm_custom_ead_column, dm_custom_eadend_title_row
3340 STRCPY_TEXT_PRINT tDiveEAD_END
3341 WIN_TINY dm_custom_tissue_title_column, dm_custom_tissue_title_row 3339 WIN_TINY dm_custom_tissue_title_column, dm_custom_tissue_title_row
3342 STRCPY_TEXT_PRINT tDiveTissues 3340 STRCPY_TEXT_PRINT tDiveTissues
3343 TFT_ead_end_tissues_clock_mask2: ; Show only clock 3341 TFT_battinfo_tissues_clock_mask2: ; Show only clock
3342 WIN_TINY dm_custom_ead_column, dm_custom_eadend_title_row
3343 STRCPY_TEXT_PRINT tBatteryV ; "Battery: "
3344 WIN_TINY dm_custom_clock_column, dm_custom_clock_title_row 3344 WIN_TINY dm_custom_clock_column, dm_custom_clock_title_row
3345 STRCPY_TEXT_PRINT tDiveClock 3345 STRCPY_TEXT_PRINT tDiveClock
3346 goto TFT_standard_color; and return... 3346 goto TFT_standard_color; and return...
3347 3347
3348 global TFT_ead_end_tissues_clock ; Show EAD/END, Tissues and clock 3348 global TFT_battinfo_tissues_clock ; Show EAD/END, Tissues and clock
3349 TFT_ead_end_tissues_clock: 3349 TFT_battinfo_tissues_clock:
3350 ; Update clock and date 3350 ; Update clock and date
3351 WIN_SMALL dm_custom_clock_column, dm_custom_clock_row 3351 WIN_SMALL dm_custom_clock_column, dm_custom_clock_row
3352 call TFT_clock2 ; print clock 3352 call TFT_clock2 ; print clock
3353 3353
3354 btfsc FLAG_apnoe_mode ; In Apnoe mode? 3354 ; Show Battery info
3355 return ; Yes, done. 3355 WIN_SMALL dm_custom_ead_column, dm_custom_ead_row
3356 btfsc FLAG_gauge_mode ; In Gauge mode? 3356 movff batt_percent,lo ; Get battery percent
3357 return ; Yes, done. 3357 TFT_color_code warn_battery; Color-code battery percent
3358 3358 bsf leftbind
3359 ; WIN_SMALL dive_endtime_column,dive_endtime_row 3359 output_8
3360 ; 3360 bcf leftbind
3361 ; btfss decostop_active ; Already in nodeco mode ? 3361 STRCAT "% "
3362 ; bra TFT_ead_end_tissues_clock2 ; No, overwrite with some spaces 3362 movlw 0x00
3363 ; 3363 movff WREG,buffer+4 ; Only "xxx%"
3364 ; STRCPY 0x94 ; "End of dive" icon 3364 STRCAT_PRINT ""
3365 ; movff hours,WREG 3365 bcf win_invert
3366 ; mullw .60 3366 call TFT_standard_color
3367 ; movf mins,W 3367 WIN_SMALL dm_custom_end_column, dm_custom_end_row
3368 ; addwf PRODL 3368 movff batt_voltage+0,lo
3369 ; movlw .0 3369 movff batt_voltage+1,hi
3370 ; addwfc PRODH 3370 bsf leftbind
3371 ; movff PRODL, lo 3371 output_16dp .2
3372 ; movff PRODH, hi 3372 bcf leftbind
3373 ; 3373 PUTC 'V'
3374 ; ; Add TTS 3374 movff buffer+5,buffer+4
3375 ; movff int_O_ascenttime+0,WREG ; TTS 3375 movlw 0x00
3376 ; addwf lo,F 3376 movff WREG,buffer+5 ; Only "x.yzV"
3377 ; movff int_O_ascenttime+1,WREG ; TTS is 16bits 3377 STRCAT_PRINT ""
3378 ; addwfc hi,F 3378
3379 ; 3379 btfsc FLAG_apnoe_mode ; In Apnoe mode?
3380 ; call convert_time ; converts hi:lo in minutes to hours (hi) and minutes (lo) 3380 return ; Yes, done.
3381 ; movf hi,W 3381 btfsc FLAG_gauge_mode ; In Gauge mode?
3382 ; movff lo,hi 3382 return ; Yes, done.
3383 ; movwf lo ; exchange lo and hi 3383
3384 ; output_99x 3384 ; Show tissue diagram
3385 ; PUTC ':' 3385 call TFT_divemask_color
3386 ; movff hi,lo 3386 WIN_TINY dm_custom_tissue_N2_column, dm_custom_tissue_N2_row
3387 ; output_99x 3387 STRCPY_TEXT_PRINT tN2
3388 ; STRCAT_PRINT "" 3388 WIN_TINY dm_custom_tissue_He_column, dm_custom_tissue_He_row
3389 ; bra TFT_ead_end_tissues_clock3 3389 STRCPY_TEXT_PRINT tHe
3390 ; 3390 call deco_calc_desaturation_time ; calculate desaturation time (and char_O_tissue_N2_saturation and char_O_tissue_He_saturation)
3391 ;TFT_ead_end_tissues_clock2: 3391 movlb b'00000001' ; select ram bank 1
3392 ; STRCPY_PRINT " " 3392 bra DISP_tissue_saturation_graph ; Show char_O_tissue_N2_saturation and char_O_tissue_He_saturation ; and return...
3393 ;TFT_ead_end_tissues_clock3: 3393
3394 3394 global TFT_ppo2_ead_end_cns_mask ; Show ppO2, END/EAD and CNS mask
3395 TFT_ppo2_ead_end_cns_mask:
3396 rcall TFT_mask_ppo2
3397 call TFT_divemask_color
3398 WIN_TINY dm_custom_ead_column, dm_custom_eadend_title_row
3399 STRCPY_TEXT_PRINT tDiveEAD_END
3400 WIN_TINY dm_custom_gf_title_col3, dm_custom_gf_title_row
3401 STRCPY_TEXT_PRINT tCNS2
3402 goto TFT_standard_color; and return...
3403
3404
3405 global TFT_ppo2_ead_end_cns ; Show ppO2, END/EAD and CNS
3406 TFT_ppo2_ead_end_cns:
3407 ;show ppO2
3408 rcall TFT_display_ppo2_val
3395 ; Show END/EAD 3409 ; Show END/EAD
3396 WIN_SMALL dm_custom_ead_column, dm_custom_ead_row 3410 WIN_SMALL dm_custom_ead_column, dm_custom_ead_row
3397 STRCPY_TEXT tEAD ; EAD: 3411 STRCPY_TEXT tEAD ; EAD:
3398 movff char_O_EAD,lo 3412 movff char_O_EAD,lo
3399 rcall TFT_end_ead_common ; print "lo m" (or ft) and limit to 8 chars 3413 rcall TFT_end_ead_common ; print "lo m" (or ft) and limit to 8 chars
3400 WIN_SMALL dm_custom_end_column, dm_custom_end_row 3414 WIN_SMALL dm_custom_end_column, dm_custom_end_row
3401 STRCPY_TEXT tEND ; END: 3415 STRCPY_TEXT tEND ; END:
3402 movff char_O_END,lo 3416 movff char_O_END,lo
3403 rcall TFT_end_ead_common ; print "lo m" (or ft) and limit to 8 chars 3417 rcall TFT_end_ead_common ; print "lo m" (or ft) and limit to 8 chars
3404 3418 ; Show CNS
3405 ; Show tissue diagram 3419 WIN_STD dm_custom_currentgf_column, dm_custom_currentgf_row
3406 call TFT_divemask_color 3420 TFT_color_code warn_cns ; Color-code CNS output
3407 WIN_TINY dm_custom_tissue_N2_column, dm_custom_tissue_N2_row 3421 movff int_O_CNS_fraction+0,lo
3408 STRCPY_TEXT_PRINT tN2 3422 movff int_O_CNS_fraction+1,hi
3409 WIN_TINY dm_custom_tissue_He_column, dm_custom_tissue_He_row 3423 bsf leftbind
3410 STRCPY_TEXT_PRINT tHe 3424 output_16_3 ;Displays only 0...999
3411 call deco_calc_desaturation_time ; calculate desaturation time (and char_O_tissue_N2_saturation and char_O_tissue_He_saturation) 3425 bcf leftbind
3412 movlb b'00000001' ; select ram bank 1 3426 STRCAT_PRINT "%"
3413 bra DISP_tissue_saturation_graph ; Show char_O_tissue_N2_saturation and char_O_tissue_He_saturation ; and return... 3427 goto TFT_standard_color; and return...
3414 3428
3415 TFT_end_ead_common: ; print "lo m" (or ft) and limit to 8 chars 3429 TFT_end_ead_common: ; print "lo m" (or ft) and limit to 8 chars
3416 bsf leftbind 3430 bsf leftbind
3417 TSTOSS opt_units ; 0=Meters, 1=Feets 3431 TSTOSS opt_units ; 0=Meters, 1=Feets
3418 bra TFT_end_ead_common_metric 3432 bra TFT_end_ead_common_metric
3419 ;TFT_end_ead_common_imperial: 3433 ;TFT_end_ead_common_imperial: