Mercurial > public > ostc4
annotate Discovery/Inc/simulation.h @ 634:7c73f066cd16
Enable sensor check for Analog PPO2 mode:
Checks which may trigger a fallback warning were not activated in previous versions. Beside enabling the checks the test logic has been changed. Before the change an avarage was build automatically using the remaining both sensors if one sensor failed. The scenario that also one of the remaining sensors may be out of bounds was not covered. The new implementation allows an out of bounds detection for all sensors in parallel. In that special case the last valid value will be used until the diver takes action (Fallback warning)
author | Ideenmodellierer |
---|---|
date | Wed, 24 Feb 2021 19:18:26 +0100 |
parents | 55a9aa740f13 |
children | 21949c88da90 |
rev | line source |
---|---|
38 | 1 /////////////////////////////////////////////////////////////////////////////// |
2 /// -*- coding: UTF-8 -*- | |
3 /// | |
4 /// \file Discovery/Inc/simulation.h | |
5 /// \brief | |
6 /// \author Heinrichs Weikamp | |
7 /// \date 2018 | |
8 /// | |
9 /// $Id$ | |
10 /////////////////////////////////////////////////////////////////////////////// | |
11 /// \par Copyright (c) 2014-2018 Heinrichs Weikamp gmbh | |
12 /// | |
13 /// This program is free software: you can redistribute it and/or modify | |
14 /// it under the terms of the GNU General Public License as published by | |
15 /// the Free Software Foundation, either version 3 of the License, or | |
16 /// (at your option) any later version. | |
17 /// | |
18 /// This program is distributed in the hope that it will be useful, | |
19 /// but WITHOUT ANY WARRANTY; without even the implied warranty of | |
20 /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
21 /// GNU General Public License for more details. | |
22 /// | |
23 /// You should have received a copy of the GNU General Public License | |
24 /// along with this program. If not, see <http://www.gnu.org/licenses/>. | |
25 ////////////////////////////////////////////////////////////////////////////// | |
26 | |
27 #ifndef SIMULATION_H | |
28 #define SIMULATION_H | |
29 | |
30 #include "stm32f4xx_hal.h" | |
31 #include "data_central.h" | |
32 | |
33 typedef struct | |
34 { | |
35 uint8_t depthMeterFirstStop; | |
36 uint8_t descentRateMeterPerMinute; | |
37 uint8_t ascentRateMeterPerMinute; | |
38 uint16_t timeToBottom; | |
39 uint16_t timeAtBottom; | |
40 uint16_t timeToFirstStop; | |
41 uint16_t timeToSurface; | |
42 float ppO2AtBottom; | |
43 } SSimDataSummary; | |
44 | |
45 void simulation_start(int aim_depth); | |
46 void simulation_exit(void); | |
47 | |
48 void simulation_set_heed_decostops(_Bool heed_decostops_while_ascending); | |
49 | |
50 void simulation_UpdateLifeData( _Bool checkOncePerSecond); | |
51 void simulation_set_zero_time_descent(void); | |
52 | |
53 uint16_t simulation_get_aim_depth(void); | |
54 _Bool simulation_get_heed_decostops(void); | |
55 SDecoinfo* simulation_decoplaner(uint16_t depth_meter, uint16_t intervall_time_minutes, uint16_t dive_time_minutes, uint8_t *gasChangeListDepthGas20x2); | |
56 SDecoinfo* simulation_decoplaner_Bachelorarbeit_VPM(uint16_t depth_meter, uint16_t intervall_time_minutes, uint16_t dive_time_minutes, uint8_t *gasChangeListDepthGas20x2); | |
57 void simulation_gas_consumption(uint16_t *outputConsumptionList, uint16_t depth_meter, uint16_t dive_time_minutes, SDecoinfo *decoInfoInput, uint8_t gasConsumTravelInput, uint8_t gasConsumDecoInput, const uint8_t *gasChangeListDepthGas20x2); | |
58 void simulation_helper_change_points(SSimDataSummary *outputSummary, uint16_t depth_meter, uint16_t dive_time_minutes, SDecoinfo *decoInfoInput, const uint8_t *gasChangeListDepthGas20x2); | |
59 | |
60 | |
61 void Sim_Descend (void); | |
62 void Sim_Ascend (void); | |
63 void Sim_Divetime (void); | |
64 void Sim_Quit (void); | |
65 | |
629
55a9aa740f13
Added functionality to add ppo2 mV offset:
Ideenmodellierer
parents:
225
diff
changeset
|
66 void Sim_IncreasePPO(uint8_t sensorIdx); |
55a9aa740f13
Added functionality to add ppo2 mV offset:
Ideenmodellierer
parents:
225
diff
changeset
|
67 void Sim_DecreasePPO(uint8_t sensorIdx); |
55a9aa740f13
Added functionality to add ppo2 mV offset:
Ideenmodellierer
parents:
225
diff
changeset
|
68 |
38 | 69 |
70 #endif /* SIMULATION_H */ |