Mercurial > public > mk2
comparison code_part1/OSTC_code_asm_part1/pled_outputs.asm @ 572:80a1d2d5a9ee
timeout display when deco stops are violated
author | heinrichsweikamp |
---|---|
date | Fri, 20 Apr 2012 21:32:03 +0200 |
parents | 7f5419d4157d |
children | 101fec6a6137 |
comparison
equal
deleted
inserted
replaced
571:7f5419d4157d | 572:80a1d2d5a9ee |
---|---|
567 bcf leftbind | 567 bcf leftbind |
568 return | 568 return |
569 | 569 |
570 ;============================================================================= | 570 ;============================================================================= |
571 | 571 |
572 PLED_divemode_timeout2: | |
573 WIN_TOP .54 | |
574 WIN_LEFT .112 | |
575 WIN_FONT FT_SMALL | |
576 WIN_INVERT .1 | |
577 call PLED_warnings_color | |
578 STRCPY 0x94 ; "End of dive" icon | |
579 movff timeout_counter, lo | |
580 movff timeout_counter2, hi | |
581 call convert_time ; converts hi:lo in minutes to hours (hi) and minutes (lo) | |
582 movf hi,W | |
583 movff lo,hi | |
584 movwf lo ; exchange lo and hi | |
585 output_99x | |
586 PUTC ':' | |
587 movff hi,lo | |
588 output_99x | |
589 STRCAT_PRINT " " | |
590 bsf timeout_display ; Set Flag | |
591 call PLED_standard_color | |
592 WIN_INVERT .0 | |
593 return | |
594 | |
572 PLED_divemode_timeout: | 595 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 | 596 WIN_TOP .54 |
581 WIN_LEFT .112 | 597 WIN_LEFT .112 |
582 WIN_FONT FT_SMALL | 598 WIN_FONT FT_SMALL |
583 call PLED_standard_color | 599 call PLED_standard_color |
584 STRCPY 0x94 ; "End of dive" icon | 600 STRCPY 0x94 ; "End of dive" icon |
585 GETCUSTOM15 d'2' ; diveloop_timeout | 601 GETCUSTOM15 d'2' ; diveloop_timeout |
586 movff lo,sub_a+0 | 602 movff lo,sub_a+0 |
587 movff hi,sub_a+1 | 603 movff hi,sub_a+1 |
588 movff timeout_counter, sub_b+0 | 604 movff timeout_counter, sub_b+0 |
589 movff timeout_counter2, sub_b+1 | 605 movff timeout_counter2, sub_b+1 ; Divemode timeout |
590 call sub16 ; sub_c = sub_a - sub_b | 606 call sub16 ; sub_c = sub_a - sub_b |
591 movff sub_c+0,lo | 607 movff sub_c+0,lo |
592 movff sub_c+1,hi | 608 movff sub_c+1,hi |
593 call convert_time ; converts hi:lo in minutes to hours (hi) and minutes (lo) | 609 call convert_time ; converts hi:lo in minutes to hours (hi) and minutes (lo) |
594 movf hi,W | 610 movf hi,W |
601 STRCAT_PRINT " " | 617 STRCAT_PRINT " " |
602 bsf timeout_display ; Set Flag | 618 bsf timeout_display ; Set Flag |
603 return | 619 return |
604 | 620 |
605 PLED_divemode_timeout_clear: | 621 PLED_divemode_timeout_clear: |
622 btfsc dekostop_active ; Is a deco stop displayed? | |
623 call PLED_display_deko_mask ; Yes, redraw mask | |
624 | |
606 WIN_TOP .54 | 625 WIN_TOP .54 |
607 WIN_LEFT .112 | 626 WIN_LEFT .112 |
608 movlw d'6' | 627 movlw d'6' |
609 movwf temp1 | 628 movwf temp1 |
610 bcf timeout_display ; Clear flag | 629 bcf timeout_display ; Clear flag |