adafruit / adafruit/Adafruit_Wippersnapper_Arduino

Refactor provisioning/

Open
#855 0 comments 0 reactions 0 assignees View on GitHub
provisioning refactor sdcard
Dominant language
C++
Stars
54
Forks
56
Avg merge
2d 12h
Merged PRs (30d)
11

Description

`src/provisioning/` is got muddled as we added features to v1/v2:

```
src/provisioning/
├── Config.h
├── ConfigJson.cpp
├── ConfigJson.h
├── littlefs
│   ├── WipperSnapper_LittleFS.cpp
│   └── WipperSnapper_LittleFS.h
├── sdcard
│   ├── ws_sdcard.cpp
│   └── ws_sdcard.h
└── tinyusb
├── fatfs
│   ├── diskio.h
│   ├── ff.c
│   ├── ff.h
│   └── ffconf.h
├── Wippersnapper_FS.cpp
└── Wippersnapper_FS.h
```

What I'd like this to look like:
* create a filesystem/ dir
* create a base filesystem class
* create classes to handle FS-specific implementations for LittleFS and TinyUSB
* create a base class in provisioning/ instead to interact with the app-level `provision()` call and handle the high-level calls down to the filesystem class

extra, what to do with offline and sdcard:
* split out `src/provisioning/sdcard/` to `src/logger/sdcard` to separate concerns
* figure out how sdlogger mode fits into provisioning call! Maybe it doesn't and we need a new mechanism/call for deciding which mode we are in (cloud or logger)! That is okay, we can create this

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by mapping the files under src/provisioning/ and tracing the app-level provision() call. Review the LittleFS, TinyUSB, and sdcard implementations to define the scope of the filesystem and logger separation. Done means the provisioning structure and sdlogger interaction follow an agreed design, with relevant behavior preserved.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
embedded-iot
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.