feat(settings): SPIFFS設定ファイルのフォールバック対応 / add SPIFFS settings fallback#9
Open
Keitark wants to merge 1 commit into
Open
feat(settings): SPIFFS設定ファイルのフォールバック対応 / add SPIFFS settings fallback#9Keitark wants to merge 1 commit into
Keitark wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary / 概要
This PR adds SPIFFS fallback support for loading
/wifi.txtand/apikey.txt.この PR では、
/wifi.txtと/apikey.txtを SPIFFS からも読み込めるようにします。The existing SD card behavior is preserved. The firmware first tries SD card settings, then falls back to SPIFFS only for settings that were not loaded.
既存の SD カード動作は維持しています。まず SD カード上の設定を読み込み、読み込めなかった設定のみ SPIFFS から読み込みます。
Changes / 変更内容
Extracted common setting-file parsing logic.
Added SPIFFS fallback for Wi-Fi settings.
Added SPIFFS fallback for API key settings.
Preserved existing serial output behavior when API keys are loaded.
設定ファイルの解析処理を共通化しました。
Wi-Fi 設定の SPIFFS フォールバックを追加しました。
API キー設定の SPIFFS フォールバックを追加しました。
API キー読み込み時の既存シリアル出力動作は維持しました。
Tests / テスト
pio run -e m5stack-core2=> SUCCESSpio run -e esp32-s3-devkitc-1=> SUCCESSm5stack-core2firmware to Core2.stack-chan.local:80and192.168.1.16:80using settings uploaded to SPIFFS.Impact / 影響
This change keeps the existing SD card loading path and adds SPIFFS as a fallback for setting files that were not loaded from SD.
既存の SD カード読み込み経路は維持し、SD から読み込めなかった設定ファイルに対して SPIFFS をフォールバックとして使用します。
Fixes #8