File tree 1 file changed +7
-2
lines changed
1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -22,16 +22,21 @@ const char* CWifi::firmwareVersion() {
22
22
return " 99.99.99" ;
23
23
}
24
24
25
+ /*
26
+ * Since version is made in a semver fashion, thus in an integer it will be represented as
27
+ * byte 1 (MSB) | byte 2 | byte 3 | byte 4
28
+ * 0 | MAJOR | MINOR | PATCH
29
+ */
25
30
/* -------------------------------------------------------------------------- */
26
31
uint32_t CWifi::firmwareVersionU32 () {
27
32
/* -------------------------------------------------------------------------- */
28
33
uint8_t ret[4 ];
29
34
string res = " " ;
30
35
modem.begin ();
31
36
if (modem.write (string (PROMPT (_FWVERSION_U32)), res, CMD_READ (_FWVERSION_U32))) {
32
- return res[0 ] << 24 | res[1 ] << 16 | res[ 2 ] << 8 | res[3 ];
37
+ return res[0 ] << 16 | res[1 ] << 8 | res[2 ];
33
38
}
34
- return 0x63636300 ;
39
+ return 0x636363 ;
35
40
}
36
41
37
42
/* -------------------------------------------------------------------------- */
You can’t perform that action at this time.
0 commit comments