File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 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() {
2222 return " 99.99.99" ;
2323}
2424
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+ */
2530/* -------------------------------------------------------------------------- */
2631uint32_t CWifi::firmwareVersionU32 () {
2732/* -------------------------------------------------------------------------- */
2833 uint8_t ret[4 ];
2934 string res = " " ;
3035 modem.begin ();
3136 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 ];
3338 }
34- return 0x63636300 ;
39+ return 0x636363 ;
3540}
3641
3742/* -------------------------------------------------------------------------- */
You can’t perform that action at this time.
0 commit comments