Mercurial > public > mk2
comparison code_part1/OSTC_code_asm_part1/definitions.asm @ 125:2907b42c195b
Altimeter:
- use H = 19902 log10(P0/P)
- Interface to select sea level mbars.
- Average over 32 values, using 1/16 of mbar.
- Display in customview area.
- Fix display ****m when not yet computed
- Fix reset when exiting sleep mode
- Fix : edit menu in 1/4 of mbar.
- Fix use CF#49 to enable/disable altimeter, also in altimeter menu.
- Fix visible in Menu 2
author | JeanDo |
---|---|
date | Wed, 29 Dec 2010 01:41:13 +0100 |
parents | 4f9f477bb452 |
children | 06c4899ddb4b |
comparison
equal
deleted
inserted
replaced
124:4f9f477bb452 | 125:2907b42c195b |
---|---|
71 CONFIG DEBUG = OFF ;Background debugger disabled, RB6 and RB7 configured as general purpose I/O pins | 71 CONFIG DEBUG = OFF ;Background debugger disabled, RB6 and RB7 configured as general purpose I/O pins |
72 CONFIG XINST = OFF ;Instruction set extension and Indexed Addressing mode disabled (Legacy mode) | 72 CONFIG XINST = OFF ;Instruction set extension and Indexed Addressing mode disabled (Legacy mode) |
73 CONFIG LVP = OFF ;Single-Supply ICSP disabled | 73 CONFIG LVP = OFF ;Single-Supply ICSP disabled |
74 CONFIG STVREN = OFF ;Stack full/underflow will not cause Reset | 74 CONFIG STVREN = OFF ;Stack full/underflow will not cause Reset |
75 | 75 |
76 CBLOCK 0x800 | |
77 c_code_data_stack:.64 ; Reserve space for C-code data space. Eg.when calling log. | |
78 endc | |
79 | |
80 CBLOCK 0x3F0 | |
81 pressureSum:2 ; Stabilize surface presure by a long averaging window [mbar] | |
82 pressureCount ; Count of pressure values. | |
83 pressureAvg:2 ; save averaged pressure x16, for altimeter_menu | |
84 pressureRef:2 ; Pressure at sea level [mbar] | |
85 altitude:2 ; Last computed altitude [m] | |
86 ENDC | |
76 | 87 |
77 ;Variable definitions | 88 ;Variable definitions |
78 ; arrays are in hex size!! 20 = .032 | 89 ; arrays are in hex size!! 20 = .032 |
79 | 90 |
80 CBLOCK 0x060 ;Bank 0 | 91 CBLOCK 0x060 ;Bank 0 |