comparison code_part1/OSTC_code_asm_part1/pled_outputs.asm @ 408:3e0192f6c241

NEW: End-of-Dive countdown displayed after surfacing
author heinrichsweikamp
date Thu, 07 Jul 2011 21:22:05 +0200
parents 2534277be060
children c6f9eb123b85
comparison
equal deleted inserted replaced
407:47b1135cbff3 408:3e0192f6c241
567 bcf leftbind 567 bcf leftbind
568 return 568 return
569 569
570 ;============================================================================= 570 ;=============================================================================
571 571
572 PLED_divemode_timeout:
573 btfsc menubit ; Divemode menu active?
574 return ; Yes, return
575 btfsc FLAG_apnoe_mode ; In Apnoe mode?
576 return ; Yes, return
577 btfsc gauge_mode ; In Gauge mode?
578 return ; Yes, return
579
580 WIN_TOP .54
581 WIN_LEFT .112
582 WIN_FONT FT_SMALL
583 call PLED_standard_color
584 STRCPY 0x94 ; "End of dive" icon
585 GETCUSTOM15 d'2' ; diveloop_timeout
586 movff lo,sub_a+0
587 movff hi,sub_a+1
588 movff timeout_counter, sub_b+0
589 movff timeout_counter2, sub_b+1
590 call sub16 ; sub_c = sub_a - sub_b
591 movff sub_c+0,lo
592 movff sub_c+1,hi
593 call convert_time ; converts hi:lo in minutes to hours (hi) and minutes (lo)
594 movf hi,W
595 movff lo,hi
596 movwf lo ; exchange lo and hi
597 output_99x
598 PUTC ':'
599 movff hi,lo
600 output_99x
601 STRCAT_PRINT " "
602 bsf timeout_display ; Set Flag
603 return
604
605 PLED_divemode_timeout_clear:
606 WIN_TOP .54
607 WIN_LEFT .112
608 movlw d'6'
609 movwf temp1
610 bcf timeout_display ; Clear flag
611 bra PLED_display_clear_common_y1
612
572 PLED_display_velocity: 613 PLED_display_velocity:
573 ostc_debug 'v' ; Sends debug-information to screen if debugmode active 614 ostc_debug 'v' ; Sends debug-information to screen if debugmode active
574 WIN_TOP .90 615 WIN_TOP .90
575 WIN_LEFT .0 616 WIN_LEFT .0
576 WIN_FONT FT_SMALL 617 WIN_FONT FT_SMALL