Mercurial > public > ostc4
annotate Discovery/Inc/gfx_fonts.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 | f2d98ad6f1be |
children | 1c95f811967c |
rev | line source |
---|---|
38 | 1 /////////////////////////////////////////////////////////////////////////////// |
2 /// -*- coding: UTF-8 -*- | |
3 /// | |
4 /// \file Discovery/Inc/gfx_fonts.h | |
5 /// \brief Header file to control placement of font in STM32 Flash | |
6 /// \author heinrichs weikamp gmbh | |
7 /// \date 14-Aug-2014 | |
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 /* Define to prevent recursive inclusion -------------------------------------*/ | |
28 #ifndef GFX_FONTS_H | |
29 #define GFX_FONTS_H | |
30 | |
31 #include "gfx.h" | |
32 | |
33 // From image_heinrichs_weikamp.c | |
34 enum { indexHWcolorSIZE = 256 }; | |
35 | |
36 // Forward declarations | |
37 // | |
38 // 2018-01-01 jDG: | |
39 // - the exact address is fixed in linker script CPU1-F429.ld, | |
40 // so that every font can be used even when not included in the actual | |
41 // binary (boot-loader, fonts, or firmware). | |
42 // | |
43 // - Actual font data is defined by the OSTC4/FontPack project, that shall | |
44 // be loaded before the firmware is executed. | |
45 // | |
46 // - Font directory starts at address 0x081E0000. Each header is 12 bytes. | |
47 // A 0xFFFFFFFF (32 bits) marks the directory's end. | |
48 // It is stored between __font_directory and __font_directory_end; | |
49 // | |
50 // - Font data (chars) is stored after 0x08132040 (end of font's SFirmareData). | |
51 // So there is space for 0x081E0000 - 0x08132040 = ADFC0 = 694 KB of fonts. | |
52 // Actual data is stored between __upper_font_data and __upper_font_data_end, | |
53 // and uses 0x081b9a3a - 0x08132040 = 879FA = 542 KB. | |
54 // | |
55 extern const tFont Awe48; | |
56 extern const tFont FontT24; | |
57 extern const tFont FontT42; | |
58 extern const tFont FontT48; | |
59 extern const tFont FontT54; | |
60 extern const tFont FontT84; | |
61 extern const tFont FontT105; | |
62 extern const tFont FontT144; | |
63 | |
64 extern const tFont Batt24; | |
65 | |
66 extern const tImage ImgHWcolor; | |
67 extern const tImage ImgOSTC; | |
68 | |
69 extern const uint32_t indexHWcolor[indexHWcolorSIZE]; | |
70 | |
71 // Macro to store in UPPER rom font sections | |
44
7c786c7aa99b
Placed directory sections in firmware memory space
Ideenmodellierer
parents:
38
diff
changeset
|
72 /* TODO: Looking at older map files the directories should be placed within the firmware memory */ |
7c786c7aa99b
Placed directory sections in firmware memory space
Ideenmodellierer
parents:
38
diff
changeset
|
73 /* As well as the image data => to be confirmed */ |
74 | 74 #define UPPER_FONT_DIRECTORY __attribute__ (( used, section(".upper_font_directory") )) |
44
7c786c7aa99b
Placed directory sections in firmware memory space
Ideenmodellierer
parents:
38
diff
changeset
|
75 |
7c786c7aa99b
Placed directory sections in firmware memory space
Ideenmodellierer
parents:
38
diff
changeset
|
76 #define UPPER_IMAGE_DIRECTORY __attribute__(( section(".lower_image_directory") )) |
7c786c7aa99b
Placed directory sections in firmware memory space
Ideenmodellierer
parents:
38
diff
changeset
|
77 #define UPPER_IMAGES __attribute__(( section(".lower_images") )) |
38 | 78 |
79 #endif // GFX_FONTS_H |