Skip to content

Commit 7a355e1

Browse files
committed
Save name to LittleFS when loaded from SD
1 parent 82411ae commit 7a355e1

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

.github/workflows/rust_ci.yml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,28 +40,40 @@ jobs:
4040
uses: Swatinem/rust-cache@v2
4141
with:
4242
cache-on-failure: "true"
43+
cache-all-crates: "true"
44+
cache-directories: "target/xtensa-esp32-espidf"
45+
# - name: Install erdtree
46+
# run: cargo binstall erdtree --version 3.1.2 --target x86_64-unknown-linux-gnu --no-confirm --force
47+
# continue-on-error: true
48+
# - name: Run erdtree
49+
# run: erd && erd target
4350
# - name: Patch idf-svc
4451
# run: cargo run --manifest-path ./cargo-patch-crate-fork/Cargo.toml --target x86_64-unknown-linux-gnu
4552
- name: Run command
4653
run: cargo ${{ matrix.action.command }} ${{ matrix.action.args }}
4754
# - name: Install Linux Dependencies
4855
# run: sudo apt-get update && sudo apt-get install -y libudev-dev
4956
# continue-on-error: true
50-
- name: Setup Linux Rust toolchain and cache
51-
uses: actions-rust-lang/[email protected]
52-
continue-on-error: true
5357
# - name: Convert ELF to .bin
5458
# run: |
5559
# cargo install espflash --version 3.2.0 --target x86_64-unknown-linux-gnu
5660
# ~/.cargo/bin/espflash save-image --chip esp32 target/xtensa-esp32-espidf/release/mff-hr-v1 target/xtensa-esp32-espidf/release/app.bin
5761
# ~/.cargo/bin/espflash partition-table partitions.csv --to-binary -o target/xtensa-esp32-espidf/release/partitions-0x8000.bin
5862
# continue-on-error: true
63+
- name: Setup Linux Rust toolchain and cache
64+
uses: actions-rust-lang/[email protected]
65+
with:
66+
cache: false
67+
continue-on-error: true
5968
- name: Install Cargo Binstall
6069
uses: cargo-bins/cargo-binstall@main
70+
continue-on-error: true
6171
- name: Install espflash
6272
run: cargo binstall espflash --version 3.2.0 --target x86_64-unknown-linux-gnu --no-confirm --force
73+
continue-on-error: true
6374
- name: Build Release Binary
64-
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
75+
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
76+
continue-on-error: true
6577
- name: Archive Release artifacts
6678
uses: actions/upload-artifact@v4
6779
with:

src/app.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,7 @@ where
188188
return Ok(());
189189
}
190190
self.settings.username = fs::read_to_string("/sdcard/NAME.TXT")?;
191+
self.settings.littlefs_save()?;
191192
Ok(())
192193
}
193194
// fn custom_contiguous<I>(&mut self, area: &Rectangle, colors: I) -> Result<()>

0 commit comments

Comments
 (0)