Skip to content

Commit 1e58fdf

Browse files
committed
Show ALS sensor on unknown systems
If the system doesn't have motionsense we can't detect whether ALS is present or not based on EC information. Signed-off-by: Daniel Schaefer <dhs@frame.work>
1 parent 6c5762c commit 1e58fdf

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

framework_lib/src/power.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -305,10 +305,11 @@ pub fn print_sensors(ec: &CrosEc) {
305305
err => _ = print_err(err),
306306
}
307307

308-
// If we can't detect it based on motionsense
308+
// If we can't detect it based on motionsense, check the system family
309+
// If family is unknown, assume it has
309310
let als_family = matches!(
310311
smbios::get_family(),
311-
Some(PlatformFamily::Framework13) | Some(PlatformFamily::Framework16)
312+
Some(PlatformFamily::Framework13) | Some(PlatformFamily::Framework16) | None
312313
);
313314

314315
if has_als || als_family {

0 commit comments

Comments
 (0)