Skip to content

Commit 06d19c4

Browse files
committed
rename board to device
1 parent 66a5cf4 commit 06d19c4

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/lib.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,8 @@ pub struct AluminaApp {
174174
diag_d0:bool,diag_d1:bool,diag_d2:bool,diag_d3:bool,
175175
diag_d4:bool,diag_d5:bool,diag_d6:bool,diag_d7:bool,
176176
diag_d9:bool,diag_d11:bool,diag_d12:bool,diag_d13:bool,
177-
board_info_slot: Arc<Mutex<Option<(String /*name*/, String /*image_url*/)>>>,
178-
board_info_requested: bool,
177+
device_info_slot: Arc<Mutex<Option<(String /*name*/, String /*image_url*/)>>>,
178+
device_info_requested: bool,
179179
selected_tool: Tool,
180180
// Laser
181181
kerf: f32,
@@ -261,8 +261,8 @@ impl AluminaApp {
261261
diag_d0:false,diag_d1:false,diag_d2:false,diag_d3:false,
262262
diag_d4:false,diag_d5:false,diag_d6:false,diag_d7:false,
263263
diag_d9:false,diag_d11:false,diag_d12:false,diag_d13:false,
264-
board_info_slot: Arc::new(Mutex::new(None)),
265-
board_info_requested: false,
264+
device_info_slot: Arc::new(Mutex::new(None)),
265+
device_info_requested: false,
266266
selected_tool: Tool::Laser, // default
267267
kerf: 0.1,
268268
touch_off: true,
@@ -1313,9 +1313,9 @@ impl eframe::App for AluminaApp {
13131313
let half_h = total.y / 2.0;
13141314

13151315
// Kick off one-time board info fetch when we first visit Diagnostics
1316-
if !self.board_info_requested {
1317-
self.board_info_requested = true;
1318-
fetch_board_info(Arc::clone(&self.board_info_slot));
1316+
if !self.device_info_requested {
1317+
self.device_info_requested = true;
1318+
fetch_board_info(Arc::clone(&self.device_info_slot));
13191319
}
13201320

13211321
// Given a relative URL, return an absolute URL
@@ -1327,23 +1327,23 @@ impl eframe::App for AluminaApp {
13271327
}
13281328

13291329
// Pick up fetched info (if finished)
1330-
let fetched = { let mut g = self.board_info_slot.lock().unwrap(); g.take() };
1330+
let fetched = { let mut g = self.device_info_slot.lock().unwrap(); g.take() };
13311331
let mut board_name: Option<String> = None;
1332-
let mut board_img_url = String::from("/board/image");
1332+
let mut board_img_url = String::from("/device/image");
13331333
if let Some((name, url)) = fetched {
13341334
board_name = Some(name);
13351335
board_img_url = url;
13361336
}
13371337

13381338
// normalize every frame so it’s always http(s)://...
13391339
let board_img_url = absolutize_url(&board_img_url);
1340-
log::warn!("board image uri = {}", board_img_url);
1340+
log::warn!("device image uri = {}", board_img_url);
13411341

13421342
// ── TOP HALF: two columns (graph | board image)
13431343
ui.allocate_ui(egui::vec2(total.x, half_h), |ui| {
13441344
ui.columns(2, |cols| {
13451345
// left: graph
1346-
cols[0].heading("Graph");
1346+
cols[0].heading("IO Status");
13471347
cols[0].add_space(4.0);
13481348
egui_plot::Plot::new("diag_plot")
13491349
.width(cols[0].available_width())
@@ -1358,7 +1358,7 @@ impl eframe::App for AluminaApp {
13581358
});
13591359

13601360
// right: board image (fill column, keep aspect)
1361-
cols[1].heading(board_name.as_deref().unwrap_or("Board"));
1361+
cols[1].heading(board_name.as_deref().unwrap_or("Device"));
13621362
cols[1].add_space(4.0);
13631363
let max = cols[1].available_size();
13641364
cols[1].add(

0 commit comments

Comments
 (0)