Skip to content

Commit

Permalink
Log some details when failing to get initial ALS/brightness values
Browse files Browse the repository at this point in the history
  • Loading branch information
maximbaz committed Jan 10, 2025
1 parent 6711f14 commit 06ac92f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/predictor/controller/adaptive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ impl super::Controller for Controller {
.als_rx
.recv_timeout(Duration::from_secs(INITIAL_TIMEOUT_SECS))
.map_or_else(
|_| panic!("Did not receive initial ALS value in time"),
|e| panic!("Did not receive initial ALS value in time: {e:?}"),
Some,
);

Expand All @@ -37,7 +37,7 @@ impl super::Controller for Controller {
.user_rx
.recv_timeout(Duration::from_secs(INITIAL_TIMEOUT_SECS))
.map_or_else(
|_| panic!("Did not receive initial brightness value in time"),
|e| panic!("Did not receive initial brightness value in time: {e:?}"),
Some,
);

Expand Down
2 changes: 1 addition & 1 deletion src/predictor/controller/manual.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ impl super::Controller for Controller {
.als_rx
.recv_timeout(Duration::from_secs(INITIAL_TIMEOUT_SECS))
.map_or_else(
|_| panic!("Did not receive initial ALS value in time"),
|e| panic!("Did not receive initial ALS value in time: {e:?}"),
Some,
);
}
Expand Down

0 comments on commit 06ac92f

Please sign in to comment.