comparison src/p2_deco.c @ 640:8c1f1f334275

3.13 release
author heinrichsweikamp
date Thu, 29 Oct 2020 09:29:15 +0100
parents 9a64914a8fca
children 1212d39c9f6f 7d8a4c60ec1a
comparison
equal deleted inserted replaced
639:0ff82370991d 640:8c1f1f334275
1 // *************************************************************************** 1 // ***************************************************************************
2 // p2_deco.c combined next generation V3.09.4 2 // p2_deco.c combined next generation V3.12.1
3 // 3 //
4 // Created on: 12.05.2009 4 // Created on: 12.05.2009
5 // Author: heinrichs weikamp, contributions by Ralph Lembcke and others 5 // Author: heinrichs weikamp, contributions by Ralph Lembcke and others
6 // 6 //
7 // *************************************************************************** 7 // ***************************************************************************
877 static void load_tmr5(void) 877 static void load_tmr5(void)
878 { 878 {
879 #ifndef CROSS_COMPILE 879 #ifndef CROSS_COMPILE
880 _asm 880 _asm
881 movff 0x601,0xF7D // bank-safe load TMR5H from C variable tmr5_value first 881 movff 0x601,0xF7D // bank-safe load TMR5H from C variable tmr5_value first
882 movff 0x600,0xF7C // bank-safe load TMR5L from c variable tmr5_value thereafter 882 movff 0x600,0xF7C // bank-safe load TMR5L from C variable tmr5_value thereafter
883 bcf 0xFBA,1,0 // clear timer 5 overrun flag (0xFBA = PIR5, bit 1 = TMR5IF) 883 bcf 0xFBA,1,0 // clear timer 5 overrun flag (0xFBA = PIR5, bit 1 = TMR5IF)
884 _endasm 884 _endasm
885 #else 885 #else
886 return; 886 return;
887 #endif 887 #endif
1792 } 1792 }
1793 else 1793 else
1794 { 1794 {
1795 //---- simulated tissues ------------------------------------------------------ 1795 //---- simulated tissues ------------------------------------------------------
1796 1796
1797 // correct sim_pres_respiration if shallower than calculated stop depth 1797 #ifdef _cave_mode
1798 calc_pres_respiration = ( real_pres_respiration < sim_pres_respiration ) ? real_pres_respiration : sim_pres_respiration; 1798 // in cave mode?
1799 1799 if( !(main_status & CAVE_MODE) )
1800 // +++ pressure surcharge if outside deco stops area yet ??? 1800 {
1801 #endif
1802
1803 // (NO) - correct sim_pres_respiration if shallower than calculated stop depth
1804 calc_pres_respiration = ( real_pres_respiration < sim_pres_respiration ) ? real_pres_respiration : sim_pres_respiration;
1805
1806 #ifdef _cave_mode
1807 }
1808 #endif
1809
1801 1810
1802 status = deco_status; 1811 status = deco_status;
1803 calc_O2_ratio = sim_O2_ratio; 1812 calc_O2_ratio = sim_O2_ratio;
1804 calc_N2_ratio = sim_N2_ratio; 1813 calc_N2_ratio = sim_N2_ratio;
1805 1814