Giter Site home page Giter Site logo

osfs's People

Contributors

charlesbaynham avatar dhutchings avatar ferchinas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

osfs's Issues

BUG: Files can be duplicated if deleted files exist

If a file small enough to fit into a deleted chunk of free space is written with overwrite==true, it will be inserted into that space but the previous version that exists later on in the filesystem will not be overwritten. See

OSFS/src/OSFS.cpp

Lines 130 to 135 in 5002c74

if (isDeletedFile(workingHeader)) {
// It is. Is the space large enough for us?
int deletedSpace = workingHeader.nextFile - workingAddress;
if (deletedSpace >= sizeRequired)
writeAddress = workingAddress;
}

Not working with Blue Pill | stm32duino

First i uploaded > writeTest example
Serial output below given
Overly Simplified File System (OSFS) : write-test Formatting device... Storing an integer... Storing a string Storing a complex data type Done

then uploaded > readTest example
Serial output below given

Overly Simplified File System (OSFS) : read-test Looking for testInt... Error: 5 Looking for testStr... Error: 5 Looking for complex data type... Error: 5 Done

fragmented files

hey @charlesbaynham,

first of all nice work but i would really love to see fragmented files support for a library that is so flexible! to my knowledge it would also be very unique. there is no library that support any storage (eeprom, fram, etc.), has such a small footprint and supports fragmented files.
in my opionion its a good time to give this library a update!

I hope you see it like me.

Best regards from Germany

Ask for clone to python

Hello Charles,

I would like to clone your OSFS into python 3 version into my project https://github.com/mamin27/ecomet_i2c_raspberry_tools. I would like to use your code logic for EEPROM operation system.
I would like to know your opinion? The code will be different but I would like to use your logic of file storing into EEPROM. Currently I am working on some different code but after half year I would like to start.

Regards Marian Minar

Overwriting with a larger file?

Hello: Very interesting your library, congratulations.
I need this same but with support for "Overwriting with a larger file" do you plan to add it?
Thank you

Handle multiple memories

Hi @charlesbaynham:
Your library is just what I had in mind, I was glad to find it.
I would like to add more than one external memory to my project. An EEPROM memory and a FRAM.
But I see that the interface is through static methods, so I imagine that it is not possible to define several instances of it, one for each type and size of memory.
Am I right?

Compiler warnings (default level at Arduino IDE)

`

sketch\LeOS_EEPROM.cpp: In function 'void OSFS::readNBytes(uint16_t, unsigned int, void*)':

sketch\LeOS_EEPROM.cpp:45:11: warning: ISO C++ forbids incrementing a pointer of type 'void*' [-Wpointer-arith]

 output++;

       ^

sketch\LeOS_EEPROM.cpp: In function 'void OSFS::writeNBytes(uint16_t, unsigned int, const void*)':

sketch\LeOS_EEPROM.cpp:53:10: warning: ISO C++ forbids incrementing a pointer of type 'const void*' [-Wpointer-arith]

 input++;

      ^

In file included from sketch\LeOS_EEPROM.cpp:5:0:

sketch\OSFS.h: In instantiation of 'OSFS::result OSFS::getFile(const char*, T&) [with T = int]':

sketch\LeOS_EEPROM.cpp:274:34: required from here

sketch\OSFS.h:121:23: warning: 'readNBytesChk' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]

return readNBytesChk(add, size, &buf);

                   ^

sketch\OSFS.h:230:9: note: 'OSFS::result OSFS::readNBytesChk(uint16_t, unsigned int, void*)' declared here, later in the translation unit

result readNBytesChk(uint16_t address, unsigned int num, void* input);

     ^

sketch\OSFS.h: In instantiation of 'OSFS::result OSFS::getFile(const char*, T&) [with T = long int]':

sketch\LeOS_EEPROM.cpp:275:44: required from here

sketch\OSFS.h:121:23: warning: 'readNBytesChk' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]

return readNBytesChk(add, size, &buf);

                   ^

sketch\OSFS.h:230:9: note: 'OSFS::result OSFS::readNBytesChk(uint16_t, unsigned int, void*)' declared here, later in the translation unit

result readNBytesChk(uint16_t address, unsigned int num, void* input);

     ^

sketch\OSFS.h: In instantiation of 'OSFS::result OSFS::getFile(const char*, T&) [with T = long unsigned int]':

sketch\LeOS_EEPROM.cpp:304:53: required from here

sketch\OSFS.h:121:23: warning: 'readNBytesChk' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]

return readNBytesChk(add, size, &buf);

                   ^

sketch\OSFS.h:230:9: note: 'OSFS::result OSFS::readNBytesChk(uint16_t, unsigned int, void*)' declared here, later in the translation unit

result readNBytesChk(uint16_t address, unsigned int num, void* input);

     ^

sketch\OSFS.h: In instantiation of 'OSFS::result OSFS::getFile(const char*, T&) [with T = _LeOS_DATA_EEPROM]':

sketch\LeOS_EEPROM.cpp:357:38: required from here

sketch\OSFS.h:121:23: warning: 'readNBytesChk' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]

return readNBytesChk(add, size, &buf);

                   ^

sketch\OSFS.h:230:9: note: 'OSFS::result OSFS::readNBytesChk(uint16_t, unsigned int, void*)' declared here, later in the translation unit

result readNBytesChk(uint16_t address, unsigned int num, void* input);

     ^

sketch\OSFS.h: In instantiation of 'OSFS::result OSFS::getFile(const char*, T&) [with T = _LeOS_STAT_EEPROM]':

sketch\LeOS_EEPROM.cpp:367:39: required from here

sketch\OSFS.h:121:23: warning: 'readNBytesChk' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]

return readNBytesChk(add, size, &buf);

                   ^

sketch\OSFS.h:230:9: note: 'OSFS::result OSFS::readNBytesChk(uint16_t, unsigned int, void*)' declared here, later in the translation unit

result readNBytesChk(uint16_t address, unsigned int num, void* input);

     ^`

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.