Skip to content

Commit

Permalink
Fixing minor issues with default listing
Browse files Browse the repository at this point in the history
  • Loading branch information
ryan-summers committed Nov 14, 2023
1 parent fa34e52 commit 1a58115
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions src/hardware/flash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,11 @@ impl FlashSettings {
let mut buffer = [0u8; 512];
flash.read(0, &mut buffer[..]).unwrap();

let settings = match postcard::from_bytes(&buffer) {
Ok(settings) => settings,
let settings = match postcard::from_bytes::<Settings>(&buffer) {
Ok(mut settings) => {
settings.mac = mac;
settings
},
Err(_) => {
log::warn!(
"Failed to load settings from flash. Using defaults"
Expand Down
2 changes: 1 addition & 1 deletion src/hardware/serial_terminal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ fn handle_list(
_args: &[&str],
context: &mut Context,
) {
writeln!(context, "Available properties:").unwrap();
writeln!(context, "Available items:").unwrap();

let mut defaults = context.flash.settings.clone();
defaults.reset();
Expand Down

0 comments on commit 1a58115

Please sign in to comment.