Skip to content

Commit

Permalink
Correct frontlight system path for Kobo Libra 2
Browse files Browse the repository at this point in the history
fixes #238
  • Loading branch information
ticky committed Jun 3, 2022
1 parent df549f5 commit 320f34b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/frontlight/premixed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ const FRONTLIGHT_WHITE: &str = "/sys/class/backlight/mxc_msp430.0/brightness";

// Forma
const FRONTLIGHT_ORANGE_A: &str = "/sys/class/backlight/tlc5947_bl/color";
// Libra H₂O, Clara HD, Libra 2
// Libra H₂O, Clara HD
const FRONTLIGHT_ORANGE_B: &str = "/sys/class/backlight/lm3630a_led/color";
// Sage
// Sage, Libra 2
const FRONTLIGHT_ORANGE_C: &str = "/sys/class/leds/aw99703-bl_FL1/color";

pub struct PremixedFrontlight {
Expand All @@ -27,8 +27,8 @@ impl PremixedFrontlight {
let model = CURRENT_DEVICE.model;
let orange_path = match model {
Model::Forma | Model::Forma32GB => FRONTLIGHT_ORANGE_A,
Model::LibraH2O | Model::ClaraHD | Model::Libra2 => FRONTLIGHT_ORANGE_B,
Model::Sage => FRONTLIGHT_ORANGE_C,
Model::LibraH2O | Model::ClaraHD => FRONTLIGHT_ORANGE_B,
Model::Sage | Model::Libra2 => FRONTLIGHT_ORANGE_C,
_ => FRONTLIGHT_ORANGE_A,
};
let orange = OpenOptions::new().write(true).open(orange_path)?;
Expand Down

0 comments on commit 320f34b

Please sign in to comment.