Mercurial > public > mk2
view code_part1/OSTC_code_asm_part1/temp_extrema.asm @ 124:4f9f477bb452
Rewrite display of decoplan:
* Common stuff
- fix clearing bottom of list, for fleecker-free updates.
- fix "Wait..." topline_box while computing deco in planning
- fix 'No Deco" std color and mark last page.
- Allow stops up to 240'
* ZHL-16c model:
- 6 lines max (sim or dive)
- Print exceed stops as "add: ddd'"
* GF model
- 6 lines in divemode, 8 in planning.
- any suitable number of pages.
- "more..." when not the last page displayed.
- fix displaying special depth for last stop (CF#29).
- fix 0-time stops: just skip display.
- fix end of list when reached the deepest stop.
- fix no need to buffer decoplan twice.
author | JeanDo |
---|---|
date | Sat, 01 Jan 2011 01:57:50 +0100 |
parents | 96a35aeda5f2 |
children | 2144f19fa1eb |
line wrap: on
line source
; OSTC - diving computer code ; Copyright (C) 2008 HeinrichsWeikamp GbR ; This program is free software: you can redistribute it and/or modify ; it under the terms of the GNU General Public License as published by ; the Free Software Foundation, either version 3 of the License, or ; (at your option) any later version. ; This program is distributed in the hope that it will be useful, ; but WITHOUT ANY WARRANTY; without even the implied warranty of ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ; GNU General Public License for more details. ; You should have received a copy of the GNU General Public License ; along with this program. If not, see <http://www.gnu.org/licenses/>. ; takes care of the temperature extrema routine ; written by: Matthias Heinrichs, info@heinrichsweikamp.com ; written: 05/15/08 ; last updated: 05/15/08 ; known bugs: ; ToDo: check_temp_extrema: ; called once every minute from Sleeploop, Surfloop and Diveloop read_int_eeprom d'54' ; get lowest temperature so far movff EEDATA,sub_b+0 read_int_eeprom d'55' movff EEDATA,sub_b+1 movff temperature+0,sub_a+0 movff temperature+1,sub_a+1 call sub16 ; sub_c = sub_a - sub_b btfss neg_flag ; new lowest temperature ? bra check_temp_extrema_high ; Yes, store new value together with the date movff temperature+0,EEDATA write_int_eeprom d'54' movff temperature+1,EEDATA write_int_eeprom d'55' movff month,EEDATA write_int_eeprom d'56' movff day,EEDATA write_int_eeprom d'57' movff year,EEDATA write_int_eeprom d'58' ; Now check high extrema check_temp_extrema_high: read_int_eeprom d'59' ; get highest temperature so far movff EEDATA,sub_b+0 read_int_eeprom d'60' movff EEDATA,sub_b+1 movff temperature+0,sub_a+0 movff temperature+1,sub_a+1 call sub16 ; sub_c = sub_a - sub_b btfsc neg_flag ; new highest temperature ? return ; no, quit! ; Yes, store new value together with the date movff temperature+0,EEDATA write_int_eeprom d'59' movff temperature+1,EEDATA write_int_eeprom d'60' movff month,EEDATA write_int_eeprom d'61' movff day,EEDATA write_int_eeprom d'62' movff year,EEDATA write_int_eeprom d'63' return