File tree Expand file tree Collapse file tree 1 file changed +50
-0
lines changed Expand file tree Collapse file tree 1 file changed +50
-0
lines changed Original file line number Diff line number Diff line change
1
+ #pragma once
2
+
3
+ // esp32fota settings
4
+ extern int firmware_version_major ;
5
+ extern int firmware_version_minor ;
6
+ extern int firmware_version_patch ;
7
+
8
+ #if !defined FOTA_URL
9
+ #define FOTA_URL "http://server/fota/fota.json"
10
+ #endif
11
+
12
+ extern const char * firmware_name ;
13
+ extern const bool check_signature ;
14
+ extern const bool disable_security ;
15
+ // for debug only
16
+ extern const char * description ;
17
+ extern const char * title ;
18
+
19
+ extern esp32FOTA FOTA ;
20
+
21
+ const char * fota_debug_fmt = R "DBG_FMT(
22
+
23
+ * * * * * * * * * * * * * * * * * STAGE %s * * * * * * * * * * * * * * * * *
24
+
25
+ Description : %s
26
+ Firmware type : %s
27
+ Firmware version : %i .%i .%i
28
+ Signature check : %s
29
+ TLS Cert check : %s
30
+ Compression : %s
31
+
32
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
33
+
34
+ )DBG_FMT ";
35
+
36
+
37
+ void PrintFOTAInfo ()
38
+ {
39
+ Serial .printf ( fota_debug_fmt ,
40
+ title ,
41
+ description ,
42
+ firmware_name ,
43
+ firmware_version_major ,
44
+ firmware_version_minor ,
45
+ firmware_version_patch ,
46
+ check_signature ?"Enabled" :"Disabled" ,
47
+ disable_security ?"Disabled" :"Enabled" ,
48
+ FOTA .zlibSupported () ?"Enabled" :"Disabled"
49
+ );
50
+ }
You can’t perform that action at this time.
0 commit comments