comparison code_part1/OSTC_code_asm_part1/pled_outputs.asm @ 9:395230c28023

Added CF36: Divemask color
author heinrichsweikamp
date Tue, 09 Mar 2010 13:06:26 +0100
parents d8b426d71282
children 588a969a0cae
comparison
equal deleted inserted replaced
8:d8b426d71282 9:395230c28023
23 ; known bugs: 23 ; known bugs:
24 ; ToDo: More comments 24 ; ToDo: More comments
25 25
26 PLED_standard_color: 26 PLED_standard_color:
27 GETCUSTOM8 d'35' ; Standard output color 27 GETCUSTOM8 d'35' ; Standard output color
28 call PLED_set_color
29 return
30
31 PLED_divemask_color:
32 GETCUSTOM8 d'36' ; Standard output color
28 call PLED_set_color 33 call PLED_set_color
29 return 34 return
30 35
31 36
32 ostc_debug macro debug_temp 37 ostc_debug macro debug_temp
173 bra PLED_resetdebugger_loop ; Loop 178 bra PLED_resetdebugger_loop ; Loop
174 call clear_LEDy 179 call clear_LEDy
175 return 180 return
176 181
177 PLED_divemode_mask: ; Displays mask in Dive-Mode 182 PLED_divemode_mask: ; Displays mask in Dive-Mode
178 WIN_COLOR color_red 183 call PLED_divemask_color ; Set Color for Divemode mask
179 DISPLAYTEXTH .267 ; Max Depth 184 DISPLAYTEXTH .267 ; Max Depth
180 DISPLAYTEXT .86 ; Divetime 185 DISPLAYTEXT .86 ; Divetime
181 DISPLAYTEXT .87 ; Depth 186 DISPLAYTEXT .87 ; Depth
182 call PLED_standard_color 187 call PLED_standard_color
183 return 188 return
200 205
201 PLED_display_ndl_mask: 206 PLED_display_ndl_mask:
202 ; Clear Dekostop and Dekosum 207 ; Clear Dekostop and Dekosum
203 rcall PLED_clear_decoarea 208 rcall PLED_clear_decoarea
204 209
205 WIN_COLOR color_red 210 call PLED_divemask_color ; Set Color for Divemode mask
206 DISPLAYTEXT d'84' ; NoStop 211 DISPLAYTEXT d'84' ; NoStop
207 call PLED_standard_color 212 call PLED_standard_color
208 213
209 PLED_display_ndl_mask2: 214 PLED_display_ndl_mask2:
210 ; Clears Gradient Factor 215 ; Clears Gradient Factor
237 return 242 return
238 243
239 PLED_display_deko_mask: 244 PLED_display_deko_mask:
240 rcall PLED_clear_decoarea 245 rcall PLED_clear_decoarea
241 ; total deco time word 246 ; total deco time word
242 WIN_COLOR color_red 247 call PLED_divemask_color ; Set Color for Divemode mask
243 DISPLAYTEXT d'85' ; DECOSUM 248 DISPLAYTEXT d'85' ; DECOSUM
244 call PLED_standard_color 249 call PLED_standard_color
245 return 250 return
246 251
247 PLED_display_deko: 252 PLED_display_deko:
251 btfsc menubit ; Divemode menu active? 256 btfsc menubit ; Divemode menu active?
252 bra PLED_display_deko1 ; Yes, do not display dekostop 257 bra PLED_display_deko1 ; Yes, do not display dekostop
253 258
254 ostc_debug 'y' ; Sends debug-information to screen if debugmode active 259 ostc_debug 'y' ; Sends debug-information to screen if debugmode active
255 ; deco stop word 260 ; deco stop word
256 WIN_COLOR color_red 261 call PLED_divemask_color ; Set Color for Divemode mask
257 DISPLAYTEXT d'82' ; DEKOSTOP 262 DISPLAYTEXT d'82' ; DEKOSTOP
258 call PLED_standard_color 263 call PLED_standard_color
259 264
260 WIN_TOP .118 265 WIN_TOP .118
261 WIN_LEFT .94 266 WIN_LEFT .94
1111 movff WREG,box_temp+3 ; column left (0-159) 1116 movff WREG,box_temp+3 ; column left (0-159)
1112 movlw .101 1117 movlw .101
1113 movff WREG,box_temp+4 ; column right (0-159) 1118 movff WREG,box_temp+4 ; column right (0-159)
1114 call PLED_box 1119 call PLED_box
1115 1120
1116 movlw .255 1121 GETCUSTOM8 d'35' ; Standard output color
1117 movff WREG,box_temp+0 ; Data 1122 movff WREG,box_temp+0 ; Data
1118 movlw .70 1123 movlw .70
1119 movff WREG,box_temp+1 ; row top (0-239) 1124 movff WREG,box_temp+1 ; row top (0-239)
1120 movlw .144 1125 movlw .144
1121 movff WREG,box_temp+2 ; row bottom (0-239) 1126 movff WREG,box_temp+2 ; row bottom (0-239)
1477 movwf POSTINC2 1482 movwf POSTINC2
1478 call word_processor 1483 call word_processor
1479 return 1484 return
1480 1485
1481 update_batt_voltage2: 1486 update_batt_voltage2:
1482 movlw .255 1487 GETCUSTOM8 d'35' ; Standard output color
1483 movff WREG,box_temp+0 ; Data 1488 movff WREG,box_temp+0 ; Data
1484 movlw .174 1489 movlw .174
1485 movff WREG,box_temp+1 ; row top (0-239) 1490 movff WREG,box_temp+1 ; row top (0-239)
1486 movlw .194 1491 movlw .194
1487 movff WREG,box_temp+2 ; row bottom (0-239) 1492 movff WREG,box_temp+2 ; row bottom (0-239)
1530 cpfsgt wait_temp 1535 cpfsgt wait_temp
1531 movwf wait_temp ; Minimum = 2 1536 movwf wait_temp ; Minimum = 2
1532 1537
1533 1538
1534 update_batt_voltage2a: 1539 update_batt_voltage2a:
1535 movlw .255 1540 GETCUSTOM8 d'35' ; Standard output color
1536 movff WREG,box_temp+0 ; Data 1541 movff WREG,box_temp+0 ; Data
1537 movlw .181 1542 movlw .181
1538 movff WREG,box_temp+1 ; row top (0-239) 1543 movff WREG,box_temp+1 ; row top (0-239)
1539 movlw .187 1544 movlw .187
1540 movff WREG,box_temp+2 ; row bottom (0-239) 1545 movff WREG,box_temp+2 ; row bottom (0-239)
1567 1572
1568 update_batt_voltage2_full: 1573 update_batt_voltage2_full:
1569 movlw d'30' 1574 movlw d'30'
1570 movwf wait_temp 1575 movwf wait_temp
1571 1576
1572 movlw .255 1577 GETCUSTOM8 d'35' ; Standard output color
1573 movff WREG,box_temp+0 ; Data 1578 movff WREG,box_temp+0 ; Data
1574 movlw .181 1579 movlw .181
1575 movff WREG,box_temp+1 ; row top (0-239) 1580 movff WREG,box_temp+1 ; row top (0-239)
1576 movlw .187 1581 movlw .187
1577 movff WREG,box_temp+2 ; row bottom (0-239) 1582 movff WREG,box_temp+2 ; row bottom (0-239)
1770 1775
1771 PLED_display_apnoe_surface: 1776 PLED_display_apnoe_surface:
1772 btfsc menubit ; Divemode menu active? 1777 btfsc menubit ; Divemode menu active?
1773 return ; Yes, do not display surface mode timeout 1778 return ; Yes, do not display surface mode timeout
1774 1779
1775 WIN_COLOR color_red 1780 call PLED_divemask_color ; Set Color for Divemode mask
1776 DISPLAYTEXT d'140' ; "SURFACE" 1781 DISPLAYTEXT d'140' ; "SURFACE"
1777 call PLED_standard_color 1782 call PLED_standard_color
1778 1783
1779 1784
1780 WIN_TOP .85 1785 WIN_TOP .85
1810 call PLED_box 1815 call PLED_box
1811 return 1816 return
1812 1817
1813 1818
1814 PLED_display_apnoe_descent: 1819 PLED_display_apnoe_descent:
1815 WIN_COLOR color_red 1820 call PLED_divemask_color ; Set Color for Divemode mask
1816 DISPLAYTEXT d'139' ; "Descent" 1821 DISPLAYTEXT d'139' ; "Descent"
1817 call PLED_standard_color 1822 call PLED_standard_color
1818 1823
1819 1824
1820 WIN_TOP .145 1825 WIN_TOP .145
1877 return ; Yes, No update and return! 1882 return ; Yes, No update and return!
1878 1883
1879 ostc_debug 'V' ; Sends debug-information to screen if debugmode active 1884 ostc_debug 'V' ; Sends debug-information to screen if debugmode active
1880 ; Stopwatch 1885 ; Stopwatch
1881 1886
1882 WIN_COLOR color_red 1887 call PLED_divemask_color ; Set Color for Divemode mask
1883 DISPLAYTEXTH d'283' ; Counter 1888 DISPLAYTEXTH d'283' ; Counter
1884 call PLED_standard_color 1889 call PLED_standard_color
1885 1890
1886 1891
1887 WIN_TOP .80 1892 WIN_TOP .80
2048 DISPLAYTEXT .252 ; +10m 2053 DISPLAYTEXT .252 ; +10m
2049 DISPLAYTEXT .253 ; -10m 2054 DISPLAYTEXT .253 ; -10m
2050 return 2055 return
2051 2056
2052 PLED_decoplan_bargraph: 2057 PLED_decoplan_bargraph:
2053 movlw .255 2058 GETCUSTOM8 d'35' ; Standard output color
2054 movff WREG,box_temp+0 ; Data 2059 movff WREG,box_temp+0 ; Data
2055 movff win_top,box_temp+1 ; row top (0-239) 2060 movff win_top,box_temp+1 ; row top (0-239)
2056 movff win_top,box_temp+2 ; 2061 movff win_top,box_temp+2 ;
2057 movlw d'20' 2062 movlw d'20'
2058 addwf box_temp+2,F ; row bottom (0-239) 2063 addwf box_temp+2,F ; row bottom (0-239)
2442 movff WREG,box_temp+3 ; column left (0-159) 2447 movff WREG,box_temp+3 ; column left (0-159)
2443 movlw .115 2448 movlw .115
2444 movff WREG,box_temp+4 ; column right (0-159) 2449 movff WREG,box_temp+4 ; column right (0-159)
2445 call PLED_box 2450 call PLED_box
2446 2451
2447 movlw .255 2452 GETCUSTOM8 d'35' ; Standard output color
2448 movff WREG,box_temp+0 ; Data 2453 movff WREG,box_temp+0 ; Data
2449 movlw .58 2454 movlw .58
2450 movff WREG,box_temp+1 ; row top (0-239) 2455 movff WREG,box_temp+1 ; row top (0-239)
2451 movlw .86 2456 movlw .86
2452 movff WREG,box_temp+2 ; row bottom (0-239) 2457 movff WREG,box_temp+2 ; row bottom (0-239)
2459 2464
2460 WIN_TOP .60 2465 WIN_TOP .60
2461 WIN_LEFT .71 2466 WIN_LEFT .71
2462 WIN_FONT FT_SMALL 2467 WIN_FONT FT_SMALL
2463 WIN_INVERT .1 ; Init new Wordprocessor 2468 WIN_INVERT .1 ; Init new Wordprocessor
2464 WIN_COLOR color_red 2469 call PLED_divemask_color ; Set Color for Divemode mask
2465 lfsr FSR2,letter 2470 lfsr FSR2,letter
2466 movlw 'C' 2471 movlw 'C'
2467 movwf POSTINC2 2472 movwf POSTINC2
2468 movlw 'F' 2473 movlw 'F'
2469 movwf POSTINC2 2474 movwf POSTINC2
2481 ostc_debug 'h' ; Sends debug-information to screen if debugmode active 2486 ostc_debug 'h' ; Sends debug-information to screen if debugmode active
2482 PLED_tissue_saturation_graph: 2487 PLED_tissue_saturation_graph:
2483 ostc_debug 'i' ; Sends debug-information to screen if debugmode active 2488 ostc_debug 'i' ; Sends debug-information to screen if debugmode active
2484 ; with dd_font2display 2489 ; with dd_font2display
2485 2490
2486 movlw .255 2491 GETCUSTOM8 d'35' ; Standard output color
2487 movff WREG,box_temp+0 ; Data 2492 movff WREG,box_temp+0 ; Data
2488 movlw .25 2493 movlw .25
2489 movff WREG,box_temp+1 ; row top (0-239) 2494 movff WREG,box_temp+1 ; row top (0-239)
2490 movlw .120 2495 movlw .120
2491 movff WREG,box_temp+2 ; row bottom (0-239) 2496 movff WREG,box_temp+2 ; row bottom (0-239)
2498 lfsr FSR2, char_O_tissue_saturation+.000 ; N2 2503 lfsr FSR2, char_O_tissue_saturation+.000 ; N2
2499 movlw d'16' 2504 movlw d'16'
2500 movwf wait_temp ; 16 tissues 2505 movwf wait_temp ; 16 tissues
2501 clrf waitms_temp ; Row offset 2506 clrf waitms_temp ; Row offset
2502 PLED_tissue_saturation_graph3: 2507 PLED_tissue_saturation_graph3:
2503 movlw .255 2508 GETCUSTOM8 d'35' ; Standard output color
2504 movff WREG,box_temp+0 ; Data 2509 movff WREG,box_temp+0 ; Data
2505 movlw .28 2510 movlw .28
2506 addwf waitms_temp,W 2511 addwf waitms_temp,W
2507 movff WREG,box_temp+1 ; row top (0-239) 2512 movff WREG,box_temp+1 ; row top (0-239)
2508 movlw .28 2513 movlw .28
2535 lfsr FSR2, char_O_tissue_saturation+.016 ; He 2540 lfsr FSR2, char_O_tissue_saturation+.016 ; He
2536 movlw d'16' 2541 movlw d'16'
2537 movwf wait_temp ; 16 tissues 2542 movwf wait_temp ; 16 tissues
2538 clrf waitms_temp ; Row offset 2543 clrf waitms_temp ; Row offset
2539 PLED_tissue_saturation_graph2: 2544 PLED_tissue_saturation_graph2:
2540 movlw .255 2545 GETCUSTOM8 d'35' ; Standard output color
2541 movff WREG,box_temp+0 ; Data 2546 movff WREG,box_temp+0 ; Data
2542 movlw .86 2547 movlw .86
2543 addwf waitms_temp,W 2548 addwf waitms_temp,W
2544 movff WREG,box_temp+1 ; row top (0-239) 2549 movff WREG,box_temp+1 ; row top (0-239)
2545 movlw .86 2550 movlw .86
2812 bra PLED_clear_custom_text ; No, Delete row 2817 bra PLED_clear_custom_text ; No, Delete row
2813 WIN_TOP .200 2818 WIN_TOP .200
2814 WIN_LEFT .0 2819 WIN_LEFT .0
2815 WIN_FONT FT_SMALL 2820 WIN_FONT FT_SMALL
2816 WIN_INVERT .0 ; Init new Wordprocessor 2821 WIN_INVERT .0 ; Init new Wordprocessor
2817 WIN_COLOR color_red 2822 call PLED_divemask_color ; Set Color for Divemode mask
2818 2823
2819 lfsr FSR2,letter 2824 lfsr FSR2,letter
2820 movlw d'64' 2825 movlw d'64'
2821 movwf lo 2826 movwf lo
2822 movlw d'24' 2827 movlw d'24'