Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct frontlight system path for Kobo Libra 2 #240

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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