MCPcopy Create free account
hub / github.com/BlueAndi/Pixelix / isFsCompatible

Method isFsCompatible

src/SystemState/InitState.cpp:518–546  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

516}
517
518bool InitState::isFsCompatible()
519{
520 bool isCompatible = false;
521 JsonFile jsonFile(FILESYSTEM);
522 const size_t JSON_DOC_SIZE = 512U;
523 DynamicJsonDocument jsonDoc(JSON_DOC_SIZE);
524
525 if (true == jsonFile.load(VERSION_FILE_NAME, jsonDoc))
526 {
527 JsonVariantConst jsonVersion = jsonDoc["version"];
528
529 if (false == jsonVersion.isNull())
530 {
531 String fileSystemVersion = jsonVersion.as<const char*>();
532 String firmwareVersion = Version::getSoftwareVersion();
533
534 /* Note that the firmware version may have a additional postfix.
535 * Example: v4.1.2:b or v4.1.2:b:lc
536 * See ./scripts/get_get_rev.py for the different postfixes.
537 */
538 if (true == firmwareVersion.startsWith(fileSystemVersion))
539 {
540 isCompatible = true;
541 }
542 }
543 }
544
545 return isCompatible;
546}
547
548bool InitState::mountFilesystem()
549{

Callers

nothing calls this directly

Calls 2

startsWithMethod · 0.80
loadMethod · 0.45

Tested by

no test coverage detected