Mercurial > public > mk2
comparison code_part1/OSTC_code_asm_part1/menu.asm @ 432:efe06a146773
Added Screen test sequence (raw data menu).
author | JeanDo |
---|---|
date | Fri, 05 Aug 2011 05:52:01 +0200 |
parents | 6bdf80d7276c |
children | f6cdd0079c36 |
comparison
equal
deleted
inserted
replaced
431:db57241d36f3 | 432:efe06a146773 |
---|---|
417 DISPLAYTEXTH .296 ; Raw Data: | 417 DISPLAYTEXTH .296 ; Raw Data: |
418 WIN_INVERT .0 ; Init new Wordprocessor | 418 WIN_INVERT .0 ; Init new Wordprocessor |
419 | 419 |
420 call PLED_static_raw_data | 420 call PLED_static_raw_data |
421 | 421 |
422 | |
422 clrf timeout_counter2 | 423 clrf timeout_counter2 |
423 bcf sleepmode | 424 bcf sleepmode |
424 bcf menubit2 | |
425 bcf menubit3 | 425 bcf menubit3 |
426 bsf menubit | 426 bsf menubit |
427 | |
428 show_rawdata_loop: | |
429 rcall show_rawdata_wait | |
430 | |
431 btfsc menubit2 | |
432 bra show_rawdata_next | |
433 | |
434 btfsc onesecupdate | |
435 call PLED_update_raw_data | |
436 | |
437 bcf onesecupdate ; End of one second tasks, if any. | |
438 | |
439 goto show_rawdata_loop | |
440 | |
441 show_rawdata_wait: | |
442 bcf menubit2 | |
427 bcf switch_left | 443 bcf switch_left |
428 bcf switch_right | 444 bcf switch_right |
429 show_rawdata_loop: | 445 |
446 show_rawdata_wait_1: | |
430 btfsc uart_dump_screen ; Asked to dump screen contains ? | 447 btfsc uart_dump_screen ; Asked to dump screen contains ? |
431 call dump_screen ; Yes! | 448 call dump_screen ; Yes! |
432 | 449 |
433 btfsc switch_left ; Ack? | 450 btfsc switch_left ; Ack? |
434 bsf menubit2 | 451 bsf menubit2 |
435 btfsc switch_right ; Ack? | 452 btfsc switch_right ; Ack? |
436 bsf menubit2 | 453 bsf menubit2 |
437 | 454 |
438 btfsc menubit2 | 455 btfsc menubit2 |
439 bra show_rawdata_exit | 456 return |
440 | 457 |
441 btfss menubit | 458 btfss menubit |
442 goto restart ; exit menu, restart and enter surfmode | 459 goto restart ; exit menu, restart and enter surfmode |
443 | 460 |
444 btfsc onesecupdate | 461 btfsc onesecupdate |
445 call timeout_surfmode | 462 call timeout_surfmode |
446 | 463 |
447 btfsc onesecupdate | 464 btfsc onesecupdate |
448 call PLED_update_raw_data | |
449 | |
450 btfsc onesecupdate | |
451 call set_dive_modes | 465 call set_dive_modes |
452 | |
453 bcf onesecupdate ; End of one second tasks | |
454 | 466 |
455 btfsc sleepmode | 467 btfsc sleepmode |
456 bra show_rawdata_exit ; Exit | 468 bra show_rawdata_exit ; Exit |
457 | 469 |
458 btfsc divemode | 470 btfsc divemode |
459 goto restart ; exit menu, restart and enter divemode | 471 goto restart ; exit menu, restart and enter divemode |
460 | 472 |
461 bra show_rawdata_loop | 473 btfsc onesecupdate |
474 return | |
475 | |
476 bra show_rawdata_wait_1 | |
477 | |
478 ; Display blank/red/green/blue screens until click, to test OLED ageing. | |
479 show_rawdata_next: | |
480 setf WREG | |
481 WIN_BOX_COLOR .0,.240,.0,.160 | |
482 rcall show_rawdata_screen_wait | |
483 movlw color_red | |
484 WIN_BOX_COLOR .0,.240,.0,.160 | |
485 rcall show_rawdata_screen_wait | |
486 movlw color_green | |
487 WIN_BOX_COLOR .0,.240,.0,.160 | |
488 rcall show_rawdata_screen_wait | |
489 movlw color_blue | |
490 WIN_BOX_COLOR .0,.240,.0,.160 | |
491 rcall show_rawdata_screen_wait | |
492 bra show_rawdata_exit | |
493 | |
494 show_rawdata_screen_wait: | |
495 rcall show_rawdata_wait | |
496 bcf onesecupdate ; No dynamic update here... | |
497 | |
498 btfsc menubit2 | |
499 return | |
500 | |
501 bra show_rawdata_screen_wait | |
462 | 502 |
463 show_rawdata_exit: | 503 show_rawdata_exit: |
464 movlw d'4' | 504 movlw d'4' |
465 movwf menupos | 505 movwf menupos |
466 bcf switch_right | 506 bcf switch_right |