comparison src/logbook.asm @ 124:40ff64d60054

cleanup
author heinrichsweikamp
date Sun, 29 Jun 2014 13:53:46 +0200
parents f3062a611eef
children 95d05cc14736
comparison
equal deleted inserted replaced
123:d076e9c02438 124:40ff64d60054
434 434
435 call TFT_standard_color 435 call TFT_standard_color
436 call logbook_show_divenumber ; Show the dive number in medium font 436 call logbook_show_divenumber ; Show the dive number in medium font
437 437
438 WIN_SMALL logbook_date_column, logbook_date_row 438 WIN_SMALL logbook_date_column, logbook_date_row
439 lfsr FSR2,buffer
440 LOG_POINT_TO log_date 439 LOG_POINT_TO log_date
441 call ext_flash_byte_read_plus 440 call ext_flash_byte_read_plus
442 movff temp1,convert_value_temp+2 ; Year 441 movff temp1,convert_value_temp+2 ; Year
443 call ext_flash_byte_read_plus 442 call ext_flash_byte_read_plus
444 movff temp1,convert_value_temp+0 ; Month 443 movff temp1,convert_value_temp+0 ; Month
446 movff temp1,convert_value_temp+1 ; Day 445 movff temp1,convert_value_temp+1 ; Day
447 call TFT_convert_date ; converts into "DD/MM/YY" or "MM/DD/YY" or "YY/MM/DD" in postinc2 446 call TFT_convert_date ; converts into "DD/MM/YY" or "MM/DD/YY" or "YY/MM/DD" in postinc2
448 STRCAT_PRINT "" 447 STRCAT_PRINT ""
449 448
450 WIN_SMALL logbook_time_column, logbook_time_row 449 WIN_SMALL logbook_time_column, logbook_time_row
451 lfsr FSR2,buffer
452 call ext_flash_byte_read_plus ; hour 450 call ext_flash_byte_read_plus ; hour
453 movff temp1,lo 451 movff temp1,lo
454 call ext_flash_byte_read_plus ; Minutes 452 call ext_flash_byte_read_plus ; Minutes
455 movf lo,W 453 movf lo,W
456 mullw .60 454 mullw .60
519 bnz display_profile_offset4 ; No, continue 517 bnz display_profile_offset4 ; No, continue
520 incf x_scale+1,F ; Yes, make x_scale+1>1 to make "display_profile2e" working 518 incf x_scale+1,F ; Yes, make x_scale+1>1 to make "display_profile2e" working
521 519
522 display_profile_offset4: 520 display_profile_offset4:
523 WIN_SMALL log_max_value_column,log_max_value_row 521 WIN_SMALL log_max_value_column,log_max_value_row
524 lfsr FSR2,buffer
525 522
526 TSTOSS opt_units ; 0=Meters, 1=Feets 523 TSTOSS opt_units ; 0=Meters, 1=Feets
527 bra display_profile_offset4_metric 524 bra display_profile_offset4_metric
528 ;display_profile_offset4_imperial: 525 ;display_profile_offset4_imperial:
529 call convert_mbar_to_feet ; convert value in lo:hi from mbar to feet 526 call convert_mbar_to_feet ; convert value in lo:hi from mbar to feet
550 movwf xB+0 547 movwf xB+0
551 clrf xB+1 548 clrf xB+1
552 call mult16x16 ; result is in xC:2 ! 549 call mult16x16 ; result is in xC:2 !
553 550
554 WIN_SMALL log_divetime_value_column,log_divetime_value_row 551 WIN_SMALL log_divetime_value_column,log_divetime_value_row
555 lfsr FSR2,buffer
556 bsf leftbind 552 bsf leftbind
557 output_16 ; divetime minutes 553 output_16 ; divetime minutes
558 movlw LOW d'600' 554 movlw LOW d'600'
559 movwf xA+0 555 movwf xA+0
560 movlw HIGH d'600' 556 movlw HIGH d'600'
1446 movff sub_c+0,lo 1442 movff sub_c+0,lo
1447 movff sub_c+1,hi 1443 movff sub_c+1,hi
1448 1444
1449 logbook_show_divenumber3: 1445 logbook_show_divenumber3:
1450 WIN_MEDIUM logbook_divenumer_column, logbook_divenumer_row 1446 WIN_MEDIUM logbook_divenumer_column, logbook_divenumer_row
1451 lfsr FSR2,buffer
1452 bsf leftbind 1447 bsf leftbind
1453 output_16 ; # of dive in logbook 1448 output_16 ; # of dive in logbook
1454 bcf leftbind 1449 bcf leftbind
1455 STRCAT_PRINT "" 1450 STRCAT_PRINT ""
1456 return 1451 return
1499 call ext_flash_byte_read_plus ; read surface pressure 1494 call ext_flash_byte_read_plus ; read surface pressure
1500 movff temp1,lo 1495 movff temp1,lo
1501 call ext_flash_byte_read_plus ; read surface pressure 1496 call ext_flash_byte_read_plus ; read surface pressure
1502 movff temp1,hi 1497 movff temp1,hi
1503 WIN_TINY MBAR_column,MBAR_row 1498 WIN_TINY MBAR_column,MBAR_row
1504 lfsr FSR2,buffer
1505 bsf leftbind 1499 bsf leftbind
1506 output_16 ; Air pressure before dive 1500 output_16 ; Air pressure before dive
1507 STRCAT_TEXT_PRINT tMBAR 1501 STRCAT_TEXT_PRINT tMBAR
1508 1502
1509 ; OC/CC Gas List 1503 ; OC/CC Gas List