Mercurial > public > ostc4
annotate Discovery/Inc/Fonts/image_battery.h @ 396:effa6fb9eb89 ImproveBluetooth
Added function for BlueMod configuration:
Investigations of connection problems showed that there is a problem if the module is not able to forward data fast enough. The bottleneck in direction of microcontroller may be solved by increasing baud rate. To be backward (bootloader) compatible this is done temperoraly during every startup
Added function for signal stregth evaluation:
Quality of data connection may have an impact on stability => added function to visualize current state of connection. The evaluation may be requested remote using 'l' (0x6c) or by pressing next button while in service mode
Cleanup Disconnection procedure:
Disconnection issued by OSTC was realized by simply switching of the module which might have a negativ impact to remote devices. Second reason for change was that, e.g. in case of a timeout on OSTC side. a remote device might have continued sending firmware data causing OSTC to interpretate firmware image as service requests. E.g. resulting in a corrupted configuration. Instead of just switching off power a disconnection request is now send to the BlueMod.
Decreased size used for large data receiption:
Depending on device speed firmware transfer might be really slow. By decreasing the block size a short (6 seconds) timeout per block may be kept while the sender has more time for transfering the image
author | ideenmodellierer |
---|---|
date | Tue, 26 Nov 2019 22:12:25 +0100 |
parents | 219943ef9dc0 |
children |
rev | line source |
---|---|
38 | 1 /////////////////////////////////////////////////////////////////////////////// |
2 /// -*- coding: UTF-8 -*- | |
3 /// | |
4 /// \file Discovery/Inc/Fonts/image_battery.h | |
5 /// \brief Font to display battery filling up. | |
6 /// \author heinrichs weikamp gmbh | |
7 /// \date 2015-06-03 | |
8 /// | |
9 /// \details | |
10 /// Imported from Batt2Top - gaia by hw | |
11 /// | |
12 /// $Id$ | |
13 /////////////////////////////////////////////////////////////////////////////// | |
14 /// \par Copyright (c) 2014-2018 Heinrichs Weikamp gmbh | |
15 /// | |
16 /// This program is free software: you can redistribute it and/or modify | |
17 /// it under the terms of the GNU General Public License as published by | |
18 /// the Free Software Foundation, either version 3 of the License, or | |
19 /// (at your option) any later version. | |
20 /// | |
21 /// This program is distributed in the hope that it will be useful, | |
22 /// but WITHOUT ANY WARRANTY; without even the implied warranty of | |
23 /// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
24 /// GNU General Public License for more details. | |
25 /// | |
26 /// You should have received a copy of the GNU General Public License | |
27 /// along with this program. If not, see <http://www.gnu.org/licenses/>. | |
28 ////////////////////////////////////////////////////////////////////////////// | |
29 | |
30 #include "gfx_fonts.h" | |
31 | |
45
219943ef9dc0
Replaced generic with individual sections to invert the link order and to be able to place specific fonts at defined locations
Ideenmodellierer
parents:
38
diff
changeset
|
32 static const uint8_t image_data_Batt2Top[168] UPPER_IMAGES = { |
38 | 33 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, |
34 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, | |
35 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
36 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
37 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
38 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
39 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 | |
40 }; | |
41 | |
45
219943ef9dc0
Replaced generic with individual sections to invert the link order and to be able to place specific fonts at defined locations
Ideenmodellierer
parents:
38
diff
changeset
|
42 static const uint8_t image_data_Batt2Empty4px_of_40px[96] UPPER_IMAGES = { |
38 | 43 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x00, |
44 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x00, | |
45 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x00, | |
46 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x00 | |
47 }; | |
48 | |
45
219943ef9dc0
Replaced generic with individual sections to invert the link order and to be able to place specific fonts at defined locations
Ideenmodellierer
parents:
38
diff
changeset
|
49 static const uint8_t image_data_Batt2Full4px_of_40px[96] UPPER_IMAGES = { |
38 | 50 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, |
51 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, | |
52 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, | |
53 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00 | |
54 }; | |
55 | |
45
219943ef9dc0
Replaced generic with individual sections to invert the link order and to be able to place specific fonts at defined locations
Ideenmodellierer
parents:
38
diff
changeset
|
56 static const uint8_t image_data_Batt2Bottom[72] UPPER_IMAGES = { |
38 | 57 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
58 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, | |
59 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00 | |
60 }; | |
61 | |
45
219943ef9dc0
Replaced generic with individual sections to invert the link order and to be able to place specific fonts at defined locations
Ideenmodellierer
parents:
38
diff
changeset
|
62 static const uint8_t image_data_Batt2Blitz[312] UPPER_IMAGES = { |
38 | 63 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
64 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
65 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
66 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
67 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
68 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
69 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, | |
70 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, | |
71 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, | |
72 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, | |
73 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, | |
74 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, | |
75 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 | |
76 }; | |
77 | |
45
219943ef9dc0
Replaced generic with individual sections to invert the link order and to be able to place specific fonts at defined locations
Ideenmodellierer
parents:
38
diff
changeset
|
78 static const tImage Batt2Top UPPER_IMAGES = { image_data_Batt2Top, 7, 24}; |
219943ef9dc0
Replaced generic with individual sections to invert the link order and to be able to place specific fonts at defined locations
Ideenmodellierer
parents:
38
diff
changeset
|
79 static const tImage Batt2Empty4px_of_40px UPPER_IMAGES = { image_data_Batt2Empty4px_of_40px, 4, 24}; |
219943ef9dc0
Replaced generic with individual sections to invert the link order and to be able to place specific fonts at defined locations
Ideenmodellierer
parents:
38
diff
changeset
|
80 static const tImage Batt2Full4px_of_40px UPPER_IMAGES = { image_data_Batt2Full4px_of_40px, 4, 24}; |
219943ef9dc0
Replaced generic with individual sections to invert the link order and to be able to place specific fonts at defined locations
Ideenmodellierer
parents:
38
diff
changeset
|
81 static const tImage Batt2Bottom UPPER_IMAGES = { image_data_Batt2Bottom, 3, 24}; |
219943ef9dc0
Replaced generic with individual sections to invert the link order and to be able to place specific fonts at defined locations
Ideenmodellierer
parents:
38
diff
changeset
|
82 static const tImage Batt2Blitz UPPER_IMAGES = { image_data_Batt2Blitz, 13, 24}; |
38 | 83 |
45
219943ef9dc0
Replaced generic with individual sections to invert the link order and to be able to place specific fonts at defined locations
Ideenmodellierer
parents:
38
diff
changeset
|
84 static const tChar batt2_array[] UPPER_IMAGES = { |
38 | 85 |
86 // character: battery header | |
87 {'0', &Batt2Top}, | |
88 | |
89 // character: battery empty | |
90 {'1', &Batt2Empty4px_of_40px}, | |
91 | |
92 // character: battery full | |
93 {'2', &Batt2Full4px_of_40px}, | |
94 | |
95 // character: battery footer | |
96 {'3', &Batt2Bottom}, | |
97 | |
98 // character: battery lightning | |
99 {'4', &Batt2Blitz}, | |
100 }; | |
101 | |
45
219943ef9dc0
Replaced generic with individual sections to invert the link order and to be able to place specific fonts at defined locations
Ideenmodellierer
parents:
38
diff
changeset
|
102 const tFont Batt24 UPPER_IMAGE_DIRECTORY = { 5, batt2_array , 18, 18, 24}; |