Mercurial > public > ostc4
annotate Discovery/Inc/simulation.h @ 942:06aaccaf2e02 Evo_2_23
Power down gnss module during dive:
The gnss modul will now be send to powerdown at the start of the dive. After end of dive the module returns to normal operation.
For development / test purpose a new simulated dive profile has been added.
author | Ideenmodellierer |
---|---|
date | Mon, 16 Dec 2024 19:09:00 +0100 |
parents | 21949c88da90 |
children |
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 | |
760
21949c88da90
Quit simualted dives after the dive time set in the SIM tab.
heinrichsweikamp
parents:
629
diff
changeset
|
45 void simulation_start(int aim_depth, uint16_t aim_time_minutes); |
38 | 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 */ |