Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TODO: Move from SPIFFS to LittleFS or similar. #1182

Closed
crankyoldgit opened this issue Jun 9, 2020 · 9 comments
Closed

TODO: Move from SPIFFS to LittleFS or similar. #1182

crankyoldgit opened this issue Jun 9, 2020 · 9 comments

Comments

@crankyoldgit
Copy link
Owner

Apparently SPIFFS is depreciated.

warning: 'SPIFFS' is deprecated (declared at /home/travis/.platformio/packages/framework-arduinoespressif8266/cores/esp8266/FS.h:269): SPIFFS has been deprecated. Please consider moving to LittleFS or other filesystems. [-Wdeprecated-declarations]

Low priority.

@crankyoldgit
Copy link
Owner Author

@Caffreyfans
Copy link
Contributor

Can I come to do this job?

@NiKiZe
Copy link
Collaborator

NiKiZe commented Jul 29, 2020

Can I come to do this job?

Absolutely, marked as help-wanted for that reason. ;)
Let us know if you need anything or if something is unclear.

@NiKiZe
Copy link
Collaborator

NiKiZe commented Jul 29, 2020

ESP32 support for LittleFS still seems less then stable, I wonder if #define FS LittleFS and #define FS SPIFFS could be used.
Otherwise I think the ESP32 build needs to pull in other dependencies.

Also one other thing to note (for the release) is that any existing SPIFFS data will be lost.

@Caffreyfans
Copy link
Contributor

So, do I only move the ESP8266 part now?

@crankyoldgit
Copy link
Owner Author

So, do I only move the ESP8266 part now?

That's a reasonable first step.

I wonder if #define FS LittleFS and #define FS SPIFFS could be used.

Agreed. Having one spot for the #if defined(ESP8266) control is a better solution.

Otherwise I think the ESP32 build needs to pull in other dependencies.

I ran into that when I first gave it a quick attempt (at a full conversion). ESP8266 first is a good step in the right direction. Baby steps. ;-)

Also one other thing to note (for the release) is that any existing SPIFFS data will be lost.

Yeah, I couldn't see an easy/obvious way to do a conversion. Hence giving the user some compile-time option to control what filesystem is used is probably a good idea.
e.g.

// Uncomment one of the following to manually override what type of persistent storage is used.
// Warning: Changing filesystems will cause all previous locally saved configuration data to be lost.
// #define FILESYSTEM SPIFFS
// #define FILESYSTEM LittleFS

#ifndef FILESYSTEM
// Set the default filesystem if none was specified.
#if defined(ESP8266)
#define FILESYSTEM LittleFS
#else
#define FILESYSTEM SPIFFS
#endif  // defined(ESP8266)
#endif  // FILESYSTEM

@Caffreyfans
Copy link
Contributor

Caffreyfans commented Jul 31, 2020

I have on idea what makes warning as below:
warning: "FILESYSTEM" redefined
#define FILESYSTEM SPIFFS
note: this is the location of the previous definition
#define FILESYSTEM LittleFS

@crankyoldgit @NiKiZe

@crankyoldgit
Copy link
Owner Author

I have on idea what makes warning as below:
warning: "FILESYSTEM" redefined #define FILESYSTEM SPIFFS note: this is the location of the previous definition #define FILESYSTEM LittleFS

@crankyoldgit @NiKiZe

Appears this is generated in:

/home/travis/build/crankyoldgit/IRremoteESP8266/examples/Web-AC-control/Web-AC-control.ino:48:0: warning: "FILESYSTEM" redefined
 #define FILESYSTEM SPIFFS
 ^
/home/travis/build/crankyoldgit/IRremoteESP8266/examples/Web-AC-control/Web-AC-control.ino:46:0: note: this is the location of the previous definition
 #define FILESYSTEM LittleFS

and

/home/travis/build/crankyoldgit/IRremoteESP8266/examples/IRMQTTServer/IRMQTTServer.ino:399:0: warning: "FILESYSTEM" redefined [enabled by default]
 #define FILESYSTEM SPIFFS
 ^
/home/travis/build/crankyoldgit/IRremoteESP8266/examples/IRMQTTServer/IRMQTTServer.ino:397:0: note: this is the location of the previous definition
 #define FILESYSTEM LittleFS

Looks like the #ifndef FILESYSTEM line isn't working as expected.

Try:

#if !defined(FILESYSTEM)
// Set the default filesystem if none was specified.
#if defined(ESP8266)
#define FILESYSTEM LittleFS
#else
#define FILESYSTEM SPIFFS
#endif  // defined(ESP8266)
#endif  // !defined(FILESYSTEM)

crankyoldgit added a commit that referenced this issue Aug 31, 2020
_v2.7.10 (20200831)_

**[BREAKING CHANGES]**
- move SPIFFS to LittleFS for ESP8266 (#1182 #1226)
- Daikin176: Change & increase operating mode values. (#1233 #1235)

**[Bug Fixes]**
- TOSHIBA_AC: not turning off when using `IRac` class. (#1250 #1251)
- Haier: change position of Fan speed bits. (#1246 #1247)

**[Features]**
- Voltas: Add detailed support for Voltas A/Cs (#1238 #1248)
- Add support for Metz protocol. (#1241 #1242)
- Basic support for Voltas A/C protocol (#1238 #1243)
- Add low level bit formatting sanity checks. (#1232)

**[Misc]**
- Rewrite Airwell by using bit fields (#1254)
- Rewrite Haier YRW02 using bit fields (#1253)
- rewrite Haier HSU07-HEA03 (#1246 #1247)
- rewrite ir_Gree & ir_Midea by using bit field (#1240)
- Incorrect usage of `assert()` (#1244 #1245 #1232)
- rewrite Gree (#1210)
crankyoldgit added a commit that referenced this issue Aug 31, 2020
## v2.7.10 release
_v2.7.10 (20200831)_

**[BREAKING CHANGES]**
- move SPIFFS to LittleFS for ESP8266 (#1182 #1226)
- Daikin176: Change & increase operating mode values. (#1233 #1235)

**[Bug Fixes]**
- TOSHIBA_AC: not turning off when using `IRac` class. (#1250 #1251)
- Haier: change position of Fan speed bits. (#1246 #1247)

**[Features]**
- Voltas: Add detailed support for Voltas A/Cs (#1238 #1248)
- Add support for Metz protocol. (#1241 #1242)
- Basic support for Voltas A/C protocol (#1238 #1243)
- Add low level bit formatting sanity checks. (#1232)

**[Misc]**
- Rewrite Airwell by using bit fields (#1254)
- Rewrite Haier YRW02 using bit fields (#1253)
- rewrite Haier HSU07-HEA03 (#1246 #1247)
- rewrite ir_Gree & ir_Midea by using bit field (#1240)
- Incorrect usage of `assert()` (#1244 #1245 #1232)
- rewrite Gree (#1210)
@crankyoldgit
Copy link
Owner Author

The code changes mention have now been included in the newly released v2.7.10 of the library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants