Skip to content

prettyPrintFileSystemType() returns incorrect spelling for LittleFS #43

Closed
@aliphys

Description

@aliphys

When the prettyPrintFileSystemType() method is applied to a LittleFS partition, it correctly identifies it as a LittleFS partition. However, the spelling is LitlleFS when it should be LittleFS instead.

Partition: 1
Size: 12284
Type: LitlleFS

This is repeatable, by running the following AUA_SPIS_FORMAT_002.ino test sketch:

Sketch

#include "Arduino_UnifiedStorage.h"
#include <vector>

// Create a vector of partitions with one partition of 16MB using LittleFS
std::vector<Partition> partitioningScheme = {
    {12288, FS_LITTLEFS}, // 12 MB LittleFS Partition
};

const char testCaseID[] = "AUS_SPIS_FORMAT_002";

void setup() {
    Serial.begin(115200);
    while (!Serial);

    Serial.println("---");
    Serial.print("Test Case ID: ");
    Serial.println(testCaseID);
    Serial.println("---");

    Arduino_UnifiedStorage::debuggingModeEnabled = true;
    if (Arduino_UnifiedStorage::debuggingModeEnabled) {
        Serial.println("Arduino_UnifiedStorage debug messages ON.");
    }

    bool partitioned = InternalStorage::partition(partitioningScheme);

    // list all partitions
    std::vector<Partition> partitions = InternalStorage::readPartitions();
    for (int i = 0; i < partitions.size(); i++) {
        Serial.println("Partition: " + String(i + 1));
        Serial.println("Size: "      + String(partitions[i].size));
        Serial.println("Type: "      + prettyPrintFileSystemType(partitions[i].fileSystemType));
        Serial.println();
    }
}

void loop() {
}

Serial Monitor
---
Test Case ID: AUS_SPIS_FORMAT_002
---
Arduino_UnifiedStorage debug messages ON.
[Partitioning][isPartitioningSchemeValid][INFO] Partitioning Scheme is Valid
[Partitioning][eraseMBRSector][INFO] MBR Sector Erased
[Partitioning][eraseMBRSector][INFO] MBR Sector Erased
[Partitioning][INFO] Partition 1 created
[Partitioning][formatPartition][INFO] Formatting partition 1
[Partitioning][formatPartition][INFO] Partition 1 formatted successfully
[Partitioning][readPartitions][INFO] Partition 1 is formatted with LittleFS file system
[Partitioning][readPartitions][INFO] Partition 2 is empty, skipping
[Partitioning][readPartitions][INFO] Partition 3 is empty, skipping
[Partitioning][readPartitions][INFO] Partition 4 is empty, skipping
Partition: 1
Size: 12284
Type: LitlleFS

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions