annotate Small_CPU/Inc/system_stm32f4xx.h @ 306:2f43419102c8 cleanup-4

bugfix, cleanup: do not clip depth to 0 A real dive with the previous commits shows that testing from the simulator cannot be fully trusted in relation to logic that is close to the depth sensor (that is obviously bypassed using the simulator). So 1) there is 3 second interval between the stopwatch and the divetime, and 2) the depth flips from 1m depth to surface 0m depth, and that is visible in the profile data. Point 2) is definitely caused by the removed code in this commit. It likely is not right to clip the depth value at all. It is fine to base decisions like is done in is_ambient_pressure_close_to_surface on it, but clipping the depth value itself is seems wrong. This has become more prominent with commit eba8d1eb5bef where the clipping depth changed from 40cm of depth to 1m of depth. When comparing profiles from an OSTC Plus, it shows that no depth clipping is present there, so that is one more argument to remove it here. Point 1) The 3 sec interval is likely not a coincidence. It is the time to travel for 1m depth with a default descend speed of 20m/min. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
author Jan Mulder <jlmulder@xs4all.nl>
date Wed, 22 May 2019 14:39:04 +0200
parents 5f11787b4f42
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
2 ******************************************************************************
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
3 * @file system_stm32f4xx.h
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
4 * @author MCD Application Team
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
5 * @version V1.0.0
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
6 * @date 30-September-2011
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
7 * @brief CMSIS Cortex-M4 Device System Source File for STM32F4xx devices.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
8 ******************************************************************************
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
9 * @attention
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
10 *
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
11 * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
12 * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
13 * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
14 * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
15 * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
16 * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
17 *
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
18 * <h2><center>&copy; COPYRIGHT 2011 STMicroelectronics</center></h2>
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
19 ******************************************************************************
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
20 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
21
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
22 /** @addtogroup CMSIS
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
23 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
24 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
25
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
26 /** @addtogroup stm32f4xx_system
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
27 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
28 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
29
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
30 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
31 * @brief Define to prevent recursive inclusion
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
32 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
33 #ifndef SYSTEM_STM32F4XX_H
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
34 #define SYSTEM_STM32F4XX_H
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
35
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
36 #ifdef __cplusplus
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
37 extern "C" {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
38 #endif
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
39
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
40 /** @addtogroup STM32F4xx_System_Includes
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
41 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
42 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
43
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
44 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
45 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
46 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
47
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
48
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
49 /** @addtogroup STM32F4xx_System_Exported_types
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
50 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
51 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
52
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
53 extern uint32_t SystemCoreClock; /*!< System Clock Frequency (Core Clock) */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
54
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
55
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
56 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
57 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
58 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
59
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
60 /** @addtogroup STM32F4xx_System_Exported_Constants
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
61 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
62 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
63
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
64 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
65 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
66 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
67
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
68 /** @addtogroup STM32F4xx_System_Exported_Macros
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
69 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
70 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
71
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
72 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
73 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
74 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
75
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
76 /** @addtogroup STM32F4xx_System_Exported_Functions
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
77 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
78 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
79
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
80 extern void SystemInit(void);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
81 extern void SystemCoreClockUpdate(void);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
82 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
83 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
84 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
85
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
86 #ifdef __cplusplus
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
87 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
88 #endif
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
89
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
90 #endif /* SYSTEM_STM32F4XX_H */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
91
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
92 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
93 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
94 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
95
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
96 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
97 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
98 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
99 /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/