Skip to content

ianrrees/pluton

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

pluton

Rust tools for working with Looking Glass "holographic" displays, also available from crates.io.

Pretty basic at the moment; can read calibration data from the Looking Glass' EEPROM based on work at https://github.com/lonetech/LookingGlass .

Installing

Pluton depends on crate "hid", which in turn depends on libhidapi. On Ubuntu 18.04: #apt install libhidapi-dev.

Example

use pluton;

fn main() {
    for glass in pluton::LookingGlass::findall() {
        match glass {
            Ok(glass) => {
                println!("Serial {}:", glass.serial);
                println!("    {}x{} pixels, {} DPI", glass.screen_w, glass.screen_h, glass.dpi);
                println!("    pitch: {}", glass.pitch);
                println!("    slope: {}", glass.slope);
                println!("    center: {}", glass.center);
            },
            Err(error) => {
                println!("Had an error: {}", error.to_string());
            }
        }
    }
}

About

Rust tools for working with Looking Glass "holographic" displays

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages