Skip to content

Commit

Permalink
Add support for the Clara HD
Browse files Browse the repository at this point in the history
  • Loading branch information
baskerville committed Sep 29, 2018
1 parent 3b30876 commit 139cc95
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ use input::TouchProto;

#[derive(Debug, Copy, Clone, Eq, PartialEq)]
pub enum Model {
ClaraHD,
AuraH2OEdition2,
AuraEdition2,
AuraONE,
Expand All @@ -24,6 +25,7 @@ pub enum Model {
impl fmt::Display for Model {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
Model::ClaraHD => write!(f, "Clara HD"),
Model::AuraH2OEdition2 => write!(f, "Aura H₂O Edition 2"),
Model::AuraEdition2 => write!(f, "Aura Edition 2"),
Model::AuraONE => write!(f, "Aura ONE"),
Expand Down Expand Up @@ -63,7 +65,9 @@ impl Default for Device {
impl Device {
pub fn has_natural_light(&self) -> bool {
match self.model {
Model::AuraONE | Model::AuraH2OEdition2 => true,
Model::AuraONE |
Model::AuraH2OEdition2 |
Model::ClaraHD => true,
_ => false,
}
}
Expand Down Expand Up @@ -152,6 +156,13 @@ lazy_static! {
dims: (1080, 1440),
dpi: 265,
},
"nova" => Device {
model: Model::ClaraHD,
proto: TouchProto::MultiB,
mirrored_x: true,
dims: (1072, 1448),
dpi: 300,
},
_ => Device::default(),
}
};
Expand Down

0 comments on commit 139cc95

Please sign in to comment.