Rename LEDStrip to LedStrip
This commit is contained in:
parent
3a1faf7edc
commit
0b03474308
@ -34,13 +34,13 @@ mod ui;
|
|||||||
use errors::ProgramError;
|
use errors::ProgramError;
|
||||||
use std::sync::mpsc::channel;
|
use std::sync::mpsc::channel;
|
||||||
use std::thread;
|
use std::thread;
|
||||||
use strip::{LEDStrip, Message};
|
use strip::{LedStrip, Message};
|
||||||
use ui::console_ui_loop;
|
use ui::console_ui_loop;
|
||||||
|
|
||||||
fn main() -> Result<(), ProgramError> {
|
fn main() -> Result<(), ProgramError> {
|
||||||
let (tx, rx) = channel::<Message>();
|
let (tx, rx) = channel::<Message>();
|
||||||
let strip_handle = thread::spawn(move || -> Result<(), ProgramError> {
|
let strip_handle = thread::spawn(move || -> Result<(), ProgramError> {
|
||||||
let mut strip = LEDStrip::new(strip::Config {
|
let mut strip = LedStrip::new(strip::Config {
|
||||||
// I have 89 right now, but start off with 20
|
// I have 89 right now, but start off with 20
|
||||||
num_lights: 20,
|
num_lights: 20,
|
||||||
// Skip 14 lights
|
// Skip 14 lights
|
||||||
|
@ -37,13 +37,13 @@ pub enum Message {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[allow(clippy::module_name_repetitions)]
|
#[allow(clippy::module_name_repetitions)]
|
||||||
pub struct LEDStrip {
|
pub struct LedStrip {
|
||||||
pub adapter: Box<dyn Ws28xxAdapter>,
|
pub adapter: Box<dyn Ws28xxAdapter>,
|
||||||
pub config: Config,
|
pub config: Config,
|
||||||
pub pattern: Box<dyn Pattern>,
|
pub pattern: Box<dyn Pattern>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl LEDStrip {
|
impl LedStrip {
|
||||||
pub fn new(config: Config) -> Result<Self, ProgramError> {
|
pub fn new(config: Config) -> Result<Self, ProgramError> {
|
||||||
let adapter = Box::new(
|
let adapter = Box::new(
|
||||||
Ws28xxSpiAdapter::new("/dev/spidev0.0")
|
Ws28xxSpiAdapter::new("/dev/spidev0.0")
|
||||||
|
Loading…
Reference in New Issue
Block a user