Mercurial > public > ostc4
annotate Discovery/Inc/simulation.h @ 664:667093daa937 Betatest
Stability improvment bluetooth startup:
The previous implementation expected a default setup of the Bluetooth module. Deviations from the default expectation caused the init function to stop. The new implementation is able to fix wrong baud rate setting (reset baudrate to default 115200).
In addition the function evaluating the answers of the module is not able to derive the status out of a data stream.
author | Ideenmodellierer |
---|---|
date | Tue, 21 Dec 2021 19:36:41 +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 */ |