Skip to content

Commit

Permalink
Save name to LittleFS when loaded from SD
Browse files Browse the repository at this point in the history
  • Loading branch information
nullstalgia committed Dec 15, 2024
1 parent 82411ae commit a70f41c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
18 changes: 14 additions & 4 deletions .github/workflows/rust_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,28 +40,38 @@ jobs:
uses: Swatinem/rust-cache@v2
with:
cache-on-failure: "true"
cache-all-crates: "true"
workspaces: "xtensa-esp32-espidf"
# - name: Install erdtree
# run: cargo binstall erdtree --version 3.1.2 --target x86_64-unknown-linux-gnu --no-confirm --force
# continue-on-error: true
# - name: Run erdtree
# run: erd && erd target
# - name: Patch idf-svc
# run: cargo run --manifest-path ./cargo-patch-crate-fork/Cargo.toml --target x86_64-unknown-linux-gnu
- name: Run command
run: cargo ${{ matrix.action.command }} ${{ matrix.action.args }}
# - name: Install Linux Dependencies
# run: sudo apt-get update && sudo apt-get install -y libudev-dev
# continue-on-error: true
- name: Setup Linux Rust toolchain and cache
uses: actions-rust-lang/[email protected]
continue-on-error: true
# - name: Convert ELF to .bin
# run: |
# cargo install espflash --version 3.2.0 --target x86_64-unknown-linux-gnu
# ~/.cargo/bin/espflash save-image --chip esp32 target/xtensa-esp32-espidf/release/mff-hr-v1 target/xtensa-esp32-espidf/release/app.bin
# ~/.cargo/bin/espflash partition-table partitions.csv --to-binary -o target/xtensa-esp32-espidf/release/partitions-0x8000.bin
# continue-on-error: true
- name: Setup Linux Rust toolchain and cache
uses: actions-rust-lang/[email protected]
continue-on-error: true
- name: Install Cargo Binstall
uses: cargo-bins/cargo-binstall@main
continue-on-error: true
- name: Install espflash
run: cargo binstall espflash --version 3.2.0 --target x86_64-unknown-linux-gnu --no-confirm --force
continue-on-error: true
- name: Build Release Binary
run: espflash save-image --chip esp32 --flash-size 4mb --partition-table partitions.csv --merge target/xtensa-esp32-espidf/release/mff-hr-v1 target/xtensa-esp32-espidf/release/out.bin
run: espflash save-image --chip esp32 --flash-size 4mb --partition-table partitions.csv --merge --skip-padding target/xtensa-esp32-espidf/release/mff-hr-v1 target/xtensa-esp32-espidf/release/out.bin
continue-on-error: true
- name: Archive Release artifacts
uses: actions/upload-artifact@v4
with:
Expand Down
1 change: 1 addition & 0 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ where
return Ok(());
}
self.settings.username = fs::read_to_string("/sdcard/NAME.TXT")?;
self.settings.littlefs_save()?;
Ok(())
}
// fn custom_contiguous<I>(&mut self, area: &Rectangle, colors: I) -> Result<()>
Expand Down

0 comments on commit a70f41c

Please sign in to comment.