comparison code_part1/OSTC_code_asm_part1/pled_outputs.asm @ 87:8d3c1bef6551

some preparations for new custom view
author heinrichsweikamp
date Thu, 09 Dec 2010 22:07:36 +0100
parents 0f4c175ef824
children 3bcccb697bce
comparison
equal deleted inserted replaced
86:b40a0a6284da 87:8d3c1bef6551
389 DISPLAYTEXT .86 ; Divetime 389 DISPLAYTEXT .86 ; Divetime
390 DISPLAYTEXT .87 ; Depth 390 DISPLAYTEXT .87 ; Depth
391 call PLED_standard_color 391 call PLED_standard_color
392 return 392 return
393 393
394 PLED_clear_decoarea: 394 PLED_clear_customview_divemode:
395 movlw .0 395 movlw .0
396 movff WREG,box_temp+0 ; Data 396 movff WREG,box_temp+0 ; Data
397 movlw .60 397 movlw .168
398 movff WREG,box_temp+1 ; row top (0-239) 398 movff WREG,box_temp+1 ; row top (0-239)
399 movlw .239 399 movlw .239
400 movff WREG,box_temp+2 ; row bottom (0-239) 400 movff WREG,box_temp+2 ; row bottom (0-239)
401 movlw .090 401 movlw .090
402 movff WREG,box_temp+3 ; column left (0-159) 402 movff WREG,box_temp+3 ; column left (0-159)
403 movlw .159 403 movlw .159
404 movff WREG,box_temp+4 ; column right (0-159) 404 movff WREG,box_temp+4 ; column right (0-159)
405 call PLED_box 405 call PLED_box
406 call PLED_temp_divemode ; redraw temperature 406 return
407 call PLED_active_gas_divemode ; redraw active Gas 407
408 PLED_clear_decoarea:
409 movlw .0
410 movff WREG,box_temp+0 ; Data
411 movlw .54
412 movff WREG,box_temp+1 ; row top (0-239)
413 movlw .168
414 movff WREG,box_temp+2 ; row bottom (0-239)
415 movlw .090
416 movff WREG,box_temp+3 ; column left (0-159)
417 movlw .159
418 movff WREG,box_temp+4 ; column right (0-159)
419 call PLED_box
408 return 420 return
409 421
410 PLED_display_ndl_mask: 422 PLED_display_ndl_mask:
411 ; Clear Dekostop and Dekosum 423 ; Clear Dekostop and Dekosum
412 rcall PLED_clear_decoarea 424 rcall PLED_clear_decoarea
413 425
414 call PLED_divemask_color ; Set Color for Divemode mask 426 call PLED_divemask_color ; Set Color for Divemode mask
415 DISPLAYTEXT d'84' ; NoStop 427 DISPLAYTEXT d'84' ; NoStop
416 call PLED_standard_color 428 call PLED_standard_color
417 429
418 PLED_display_ndl_mask2: 430 PLED_display_ndl_mask2:
419 ; Clears Gradient Factor 431 ; Clears Gradient Factor
423 WIN_LEFT .0 435 WIN_LEFT .0
424 call PLED_display_clear_common_y1 436 call PLED_display_clear_common_y1
425 return 437 return
426 438
427 PLED_display_ndl: 439 PLED_display_ndl:
428 btfsc multi_gf_display ; Is the Multi-GF Table displayed? 440 btfsc menubit ; Divemode menu active?
429 return ; Yes, No update and return! 441 return ; Yes, return
430 442
431 ostc_debug 'z' ; Sends debug-information to screen if debugmode active 443 ostc_debug 'z' ; Sends debug-information to screen if debugmode active
432 444
433 WIN_TOP .185 445 WIN_TOP .136
434 WIN_LEFT .119 446 WIN_LEFT .119
435 WIN_FONT FT_MEDIUM 447 WIN_FONT FT_MEDIUM
436 WIN_INVERT .0 ; Init new Wordprocessor 448 WIN_INVERT .0 ; Init new Wordprocessor
437 call PLED_standard_color 449 call PLED_standard_color
438 450
452 DISPLAYTEXT d'85' ; TTS 464 DISPLAYTEXT d'85' ; TTS
453 call PLED_standard_color 465 call PLED_standard_color
454 return 466 return
455 467
456 PLED_display_deko: 468 PLED_display_deko:
457 btfsc multi_gf_display ; Is the Multi-GF Table displayed?
458 return ; Yes, No update and return!
459
460 btfsc menubit ; Divemode menu active? 469 btfsc menubit ; Divemode menu active?
461 bra PLED_display_deko1 ; Yes, do not display dekostop 470 bra PLED_display_deko1 ; Yes, do not display deco, only GF (if required)
462 471
463 ostc_debug 'y' ; Sends debug-information to screen if debugmode active 472 ostc_debug 'y' ; Sends debug-information to screen if debugmode active
464 ; deco stop word 473 ; deco stop word
465 call PLED_divemask_color ; Set Color for Divemode mask 474 call PLED_divemask_color ; Set Color for Divemode mask
466 DISPLAYTEXT d'82' ; DEKOSTOP 475 DISPLAYTEXT d'82' ; DEKOSTOP
467 call PLED_standard_color 476 call PLED_standard_color
468 477
469 WIN_TOP .118 478 WIN_TOP .80
470 WIN_LEFT .94 479 WIN_LEFT .94
471 WIN_FONT FT_MEDIUM 480 WIN_FONT FT_MEDIUM
472 WIN_INVERT .0 ; Init new Wordprocessor 481 WIN_INVERT .0 ; Init new Wordprocessor
473 PLED_color_code warn_ceiling ; Color-code Output 482 PLED_color_code warn_ceiling ; Color-code Output
474 lfsr FSR2,letter 483 lfsr FSR2,letter
481 movlw 0x27 ; "'" 490 movlw 0x27 ; "'"
482 movwf POSTINC2 491 movwf POSTINC2
483 call word_processor 492 call word_processor
484 WIN_FONT FT_SMALL 493 WIN_FONT FT_SMALL
485 494
486 PLED_display_deko1: 495 ;PLED_display_deko1:
487 btfsc multi_gf_display ; Is the Multi-GF Table displayed?
488 return ; Yes, No update and return!
489
490 ostc_debug 'x' ; Sends debug-information to screen if debugmode active 496 ostc_debug 'x' ; Sends debug-information to screen if debugmode active
491 497
492 WIN_TOP .185 498 WIN_TOP .136
493 WIN_LEFT .119 499 WIN_LEFT .119
494 WIN_FONT FT_MEDIUM 500 WIN_FONT FT_MEDIUM
495 WIN_INVERT .0 ; Init new Wordprocessor 501 WIN_INVERT .0 ; Init new Wordprocessor
496 call PLED_standard_color 502 call PLED_standard_color
497 lfsr FSR2,letter 503 lfsr FSR2,letter
503 output_8 509 output_8
504 movlw 0x27 ; "'" 510 movlw 0x27 ; "'"
505 movwf POSTINC2 511 movwf POSTINC2
506 call word_processor 512 call word_processor
507 513
514 PLED_display_deko1:
508 movff char_O_gradient_factor,lo ; gradient factor 515 movff char_O_gradient_factor,lo ; gradient factor
509 GETCUSTOM8 d'8' ; threshold for display 516 GETCUSTOM8 d'8' ; threshold for display
510 cpfslt lo ; show value? 517 cpfslt lo ; show value?
511 bra PLED_display_deko2 ; Yes 518 bra PLED_display_deko2 ; Yes
512 ; No 519 ; No
2298 call word_processor 2305 call word_processor
2299 bcf show_last3 2306 bcf show_last3
2300 WIN_FONT FT_SMALL 2307 WIN_FONT FT_SMALL
2301 return 2308 return
2302 2309
2303 PLED_stopwatch_remove: 2310 ;PLED_stopwatch_remove:
2304 movlw .0 2311 ; movlw .0
2305 movff WREG,box_temp+0 ; Data 2312 ; movff WREG,box_temp+0 ; Data
2306 movlw .54 2313 ; movlw .54
2307 movff WREG,box_temp+1 ; row top (0-239) 2314 ; movff WREG,box_temp+1 ; row top (0-239)
2308 movlw .102 2315 ; movlw .102
2309 movff WREG,box_temp+2 ; row bottom (0-239) 2316 ; movff WREG,box_temp+2 ; row bottom (0-239)
2310 movlw .062 2317 ; movlw .062
2311 movff WREG,box_temp+3 ; column left (0-159) 2318 ; movff WREG,box_temp+3 ; column left (0-159)
2312 movlw .159 2319 ; movlw .159
2313 movff WREG,box_temp+4 ; column right (0-159) 2320 ; movff WREG,box_temp+4 ; column right (0-159)
2314 call PLED_box 2321 ; call PLED_box
2315 return 2322 ; return
2316 2323
2317 2324
2318 PLED_stopwatch_show: 2325 PLED_stopwatch_show:
2319 btfsc menubit ; Divemode menu active?
2320 return ; Yes, No update and return!
2321
2322 ostc_debug 'V' ; Sends debug-information to screen if debugmode active 2326 ostc_debug 'V' ; Sends debug-information to screen if debugmode active
2323 ; Stopwatch 2327 ; Stopwatch
2324 2328
2325 call PLED_divemask_color ; Set Color for Divemode mask 2329 call PLED_divemask_color ; Set Color for Divemode mask
2326 DISPLAYTEXTH d'283' ; Counter 2330 DISPLAYTEXTH d'283' ; Stopwatch
2327 call PLED_standard_color 2331 call PLED_standard_color
2328 2332
2329 2333 WIN_TOP .192
2330 WIN_TOP .80
2331 WIN_LEFT .110 2334 WIN_LEFT .110
2332 WIN_FONT FT_SMALL 2335 WIN_FONT FT_SMALL
2333 call PLED_standard_color 2336 call PLED_standard_color
2334
2335
2336
2337 2337
2338 lfsr FSR2,letter 2338 lfsr FSR2,letter
2339 movff average_divesecs+0,lo ; Stopwatch 2339 movff average_divesecs+0,lo ; Stopwatch
2340 movff average_divesecs+1,hi ; Stopwatch 2340 movff average_divesecs+1,hi ; Stopwatch
2341 movlw d'2' 2341 movlw d'2'
2360 bcf leftbind 2360 bcf leftbind
2361 call word_processor 2361 call word_processor
2362 2362
2363 ostc_debug 'U' ; Sends debug-information to screen if debugmode active 2363 ostc_debug 'U' ; Sends debug-information to screen if debugmode active
2364 2364
2365 WIN_TOP .80 2365 WIN_TOP .216
2366 WIN_LEFT .62 2366 WIN_LEFT .110
2367 WIN_FONT FT_SMALL 2367 WIN_FONT FT_SMALL
2368 call PLED_standard_color 2368 call PLED_standard_color
2369 2369
2370 2370
2371 lfsr FSR2,letter 2371 lfsr FSR2,letter
2372 movff avr_rel_pressure+0,lo 2372 movff avr_rel_pressure+0,lo
2373 movff avr_rel_pressure+1,hi 2373 movff avr_rel_pressure+1,hi
2374 call adjust_depth_with_salinity ; computes salinity setting into lo:hi [mBar] 2374 call adjust_depth_with_salinity ; computes salinity setting into lo:hi [mBar]
2375 bsf leftbind
2376 bsf ignore_digit5 ; do not display 1cm depth 2375 bsf ignore_digit5 ; do not display 1cm depth
2377 output_16dp d'3' 2376 output_16dp d'3'
2378 bcf leftbind 2377 bcf leftbind
2379 movlw 'm' 2378 movlw 'm'
2380 movwf POSTINC2
2381 movlw ' '
2382 movwf POSTINC2 2379 movwf POSTINC2
2383 call word_processor 2380 call word_processor
2384 return 2381 return
2385 2382
2386 2383