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

Improve storage #2868

Open
wants to merge 25 commits into
base: main
Choose a base branch
from
Open

Conversation

networkfusion
Copy link
Member

@networkfusion networkfusion commented Jan 15, 2024

Description

  • Updates name of header
  • Changes the drive path to a define
  • Changes drive names to indexes for consistancy
  • Stops enumerating directory paths when using SPIFFS drives

Motivation and Context

work towards #2849

How Has This Been Tested?

Screenshots

Types of changes

  • Improvement (non-breaking change that improves a feature, code or algorithm)
  • Bug fix (non-breaking change which fixes an issue with code or algorithm)
  • New feature (non-breaking change which adds functionality to code)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Config and build (change in the configuration and build system, has no impact on code or features)
  • Dev Containers (changes related with Dev Containers, has no impact on code or features)
  • Dependencies (update dependencies and changes associated, has no impact on code or features)
  • Documentation (changes or updates in the documentation, has no impact on code or features)

Checklist

  • My code follows the code style of this project (only if there are changes in source code).
  • My changes require an update to the documentation (there are changes that require the docs website to be updated).
  • I have updated the documentation accordingly (the changes require an update on the docs in this repo).
  • I have read the CONTRIBUTING document.
  • I have tested everything locally and all new and existing tests passed (only if there are changes in source code).

nfbot and others added 3 commits January 15, 2024 19:52
Automated fixes for code style.
…72d0-b907-47c4-94d3-c9f48328d7c2

Code style fixes for nanoframework/nf-interpreter PR#2868
Copy link
Member

@Ellerbach Ellerbach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That look indeed cleaner :-)

@@ -47,8 +56,8 @@ typedef enum StorageEventType

// constants to be used throughout the code
#define SUPPORTED_DRIVES_COUNT (2)
#define DRIVE_LETTER_LENGTH sizeof(INDEX0_DRIVE_LETTER)
#define DRIVE_PATH_LENGTH sizeof(INDEX0_DRIVE_PATH)
#define DRIVE_LETTER_LENGTH (2)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why changing for 2?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My reasoning was that we know the length, so why base it off of a static field that should never change (as a compiler optimization. Happy to revert it though.

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