Mercurial > public > ostc4
annotate Discovery/Inc/simulation.h @ 729:d646a0f724a7
Added auto detection functionality for sensors connected to the external interface:
O2 sensors may be connected to the analog input as well as to the UART. The GUI visualization provides three slots for ppo2 display. Beside detection of sensor kind the task of the function is to place the available sensor in this three slots. CO2 has its own communication slot outside the ppo2 channel.
The result of the automatic detection is communicated via the sensor map.
author | Ideenmodellierer |
---|---|
date | Sat, 14 Jan 2023 20:46:17 +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 */ |