Skip to content

Commit

Permalink
Don't hardcode serial number
Browse files Browse the repository at this point in the history
  • Loading branch information
simonft committed Jan 16, 2024
1 parent 923e33a commit 9d8fefc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions meateatrs/src/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ impl CombustionDevice for Node {
.unwrap_or(*range.end());

let data = request::ReadLogs {
// TODO: Don't hardcode this.
probe_serial_number: SerialNumber { number: 0x10001DED },
sequence_number_start: start,
sequence_number_end: end,
Expand Down
2 changes: 2 additions & 0 deletions meatweb/src/bluetooth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ pub struct CharacteristicArgs {
#[derive(Clone)]
pub struct CurrentState {
pub temperature: f32,
pub serial_number: u32,
pub log_start: u32,
pub log_end: u32,
}
Expand Down Expand Up @@ -86,6 +87,7 @@ pub fn process_bluetooth_event(
temperature: m.status.get_core_temperature().get_celsius(),
log_start: m.status.log_start,
log_end: m.status.log_end,
serial_number: m.probe_serial_number.number,
}));
}
_ => logging::log!("{:#?}", r),
Expand Down
2 changes: 1 addition & 1 deletion meatweb/src/history.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ pub async fn request_log_updates(
.unwrap_or(*range.end());

let mut data = ReadLogs {
probe_serial_number: SerialNumber { number: 0x10001DED },
probe_serial_number: SerialNumber { number: state.serial_number },
sequence_number_start: start,
sequence_number_end: end,
}
Expand Down

0 comments on commit 9d8fefc

Please sign in to comment.