comparison code_part1/OSTC_code_asm_part1/pled_outputs.asm @ 598:f3735da18809

NEW: CF65: Show a safety stop for no-deco dives Texts 194 and 227 need translation
author heinrichsweikamp
date Sun, 24 Jun 2012 12:45:34 +0200
parents cda5b45b953f
children 227eaded4e1b
comparison
equal deleted inserted replaced
597:8172a7ce6db1 598:f3735da18809
410 btfsc menubit ; Divemode menu active? 410 btfsc menubit ; Divemode menu active?
411 return ; Yes, return 411 return ; Yes, return
412 412
413 ; Clear Dekostop and Dekosum 413 ; Clear Dekostop and Dekosum
414 rcall PLED_clear_decoarea 414 rcall PLED_clear_decoarea
415
416 call PLED_divemask_color ; Set Color for Divemode mask 415 call PLED_divemask_color ; Set Color for Divemode mask
417 DISPLAYTEXT d'84' ; NoStop 416 DISPLAYTEXT d'84' ; NoStop
418 call PLED_standard_color 417 call PLED_standard_color
419 418
420 PLED_display_ndl_mask2: 419 PLED_display_ndl_mask2:
449 btfsc menubit ; Divemode menu active? 448 btfsc menubit ; Divemode menu active?
450 return ; Yes, return 449 return ; Yes, return
451 450
452 rcall PLED_clear_decoarea 451 rcall PLED_clear_decoarea
453 ; total deco time word 452 ; total deco time word
453 bcf show_safety_stop ; Clear safety stop flag
454 call PLED_divemask_color ; Set Color for Divemode mask 454 call PLED_divemask_color ; Set Color for Divemode mask
455 DISPLAYTEXT d'85' ; TTS 455 DISPLAYTEXT d'85' ; TTS
456 DISPLAYTEXT d'82' ; DEKOSTOP 456 DISPLAYTEXT d'82' ; DEKOSTOP
457 call PLED_standard_color 457 call PLED_standard_color
458 return 458 return
510 510
511 STRCPY TXT_GF3 511 STRCPY TXT_GF3
512 movff char_O_gradient_factor,lo ; gradient factor 512 movff char_O_gradient_factor,lo ; gradient factor
513 output_8 513 output_8
514 STRCAT_PRINT "% " 514 STRCAT_PRINT "% "
515 call PLED_standard_color
516 return
517
518 PLED_show_safety_stop:
519 tstfsz safety_stop_countdown ; Countdown at zero?
520 bra PLED_show_safety_stop2 ; No, show stop
521
522 bcf show_safety_stop ; Clear flag
523
524 btfsc safety_stop_active ; Displayed?
525 rcall PLED_clear_decoarea ; Yes, Clear stop
526 bcf safety_stop_active ; Clear flag
527 bra PLED_display_ndl_mask ; Show NDL again
528
529 PLED_show_safety_stop2:
530 btfsc safety_stop_active ; Displayed?
531 bra PLED_show_safety_stop3 ; Yes.
532
533 bsf safety_stop_active ; Set flag
534
535 btfsc menubit ; Divemode menu active?
536 bra PLED_show_safety_stop3 ; Yes, do not display now but countdown
537
538 call PLED_divemask_color ; Set Color for Divemode mask
539 DISPLAYTEXT d'227' ; Safety stop
540
541 PLED_show_safety_stop3:
542 decf safety_stop_countdown,F ; Reduce countdown
543 btfsc menubit ; Divemode menu active?
544 return ; Yes, do not show
545 movff safety_stop_countdown,lo
546 call PLED_standard_color
547 WIN_TOP .80
548 WIN_LEFT .104
549 WIN_FONT FT_MEDIUM
550 WIN_INVERT .0 ; Init new Wordprocessor
551 lfsr FSR2,letter
552 clrf hi
553 call convert_time ; converts hi:lo in seconds to mins (hi) and seconds (lo)
554 movf hi,W
555 movff lo,hi
556 movwf lo ; exchange lo and hi
557 output_99
558 PUTC ':'
559 movff hi,lo
560 output_99x
561 STRCAT_PRINT ""
562 WIN_FONT FT_SMALL
515 call PLED_standard_color 563 call PLED_standard_color
516 return 564 return
517 565
518 ;============================================================================= 566 ;=============================================================================
519 ; Update simulator menu with time/depth 567 ; Update simulator menu with time/depth