Mercurial > public > hwos_code
comparison src/menu_tree.asm @ 474:2880aa1264f5
Fix new battery menu on Power-on reset
author | heinrichsweikamp |
---|---|
date | Wed, 04 Jan 2017 15:04:42 +0100 |
parents | 4fdf6886004b |
children | 44b8a826b314 |
comparison
equal
deleted
inserted
replaced
473:c6f36c55b4f6 | 474:2880aa1264f5 |
---|---|
676 movff EEDATA,battery_gauge+4 | 676 movff EEDATA,battery_gauge+4 |
677 read_int_eeprom 0x0C | 677 read_int_eeprom 0x0C |
678 movff EEDATA,battery_gauge+5 | 678 movff EEDATA,battery_gauge+5 |
679 | 679 |
680 call menu_processor_reset ; restart from first icon. | 680 call menu_processor_reset ; restart from first icon. |
681 | 681 |
682 MENU_BEGIN tNewBattTitle, .1 | |
683 MENU_CALL tEnter, new_battery_menu2 | |
684 MENU_END | |
685 | |
686 new_battery_menu2: | |
682 ; hardware_flag: | 687 ; hardware_flag: |
683 ; 3: 0x0A or 0x13 (2016) | 688 ; 3: 0x0A or 0x13 (2016) |
684 ; cR: 0x05 | 689 ; cR: 0x05 |
685 ; 2 with BLE: 0x11 | 690 ; 2 with BLE: 0x11 |
686 ; Sport: 0x12 | 691 ; Sport: 0x12 |
691 bra $+4 | 696 bra $+4 |
692 bra menu_new_battery_AA | 697 bra menu_new_battery_AA |
693 movlw 0x13 | 698 movlw 0x13 |
694 cpfseq hardware_flag | 699 cpfseq hardware_flag |
695 bra $+4 | 700 bra $+4 |
696 bra menu_new_battery_AA | 701 bra menu_new_battery_AA_16650 |
697 movlw 0x12 | 702 movlw 0x12 |
698 cpfseq hardware_flag | 703 cpfseq hardware_flag |
699 bra $+4 | 704 bra $+4 |
700 bra menu_new_battery_AA | 705 bra menu_new_battery_AA |
701 movlw 0x1A | 706 movlw 0x1A |
709 movlw 0x05 | 714 movlw 0x05 |
710 cpfseq hardware_flag | 715 cpfseq hardware_flag |
711 bra $+4 | 716 bra $+4 |
712 bra menu_new_battery_18650 | 717 bra menu_new_battery_18650 |
713 bra use_old_batteries ; any unsupported value | 718 bra use_old_batteries ; any unsupported value |
719 | |
720 menu_new_battery_AA_16650: | |
721 MENU_BEGIN tNewBattTitle, .5 | |
722 MENU_CALL tNewBattOld, use_old_batteries | |
723 MENU_CALL tNewBattNew36, use_new_36V_batteries | |
724 MENU_CALL tNewBattNew15, use_new_15V_batteries | |
725 MENU_CALL tNewBattAccu, use_36V_rechargeable | |
726 MENU_CALL tNew16650, use_16650_battery | |
727 MENU_END | |
714 | 728 |
715 menu_new_battery_AA: | 729 menu_new_battery_AA: |
716 MENU_BEGIN tNewBattTitle, .4 | 730 MENU_BEGIN tNewBattTitle, .4 |
717 MENU_CALL tNewBattOld, use_old_batteries | 731 MENU_CALL tNewBattOld, use_old_batteries |
718 MENU_CALL tNewBattNew36, use_new_36V_batteries | 732 MENU_CALL tNewBattNew36, use_new_36V_batteries |
864 bsf TRISE,2 | 878 bsf TRISE,2 |
865 movlw .4 | 879 movlw .4 |
866 movff WREG,battery_type | 880 movff WREG,battery_type |
867 return | 881 return |
868 | 882 |
883 use_16650_battery: | |
884 rcall setup_new_16650 | |
885 bra use_new_36V_2 | |
869 use_18650_battery: | 886 use_18650_battery: |
870 rcall setup_new_18650 | 887 rcall setup_new_18650 |
871 bra use_new_36V_2 | 888 bra use_new_36V_2 |
872 use_new_36V_batteries: | 889 use_new_36V_batteries: |
873 rcall setup_new_saft | 890 rcall setup_new_saft |