termion dependency; clear screen in controller display
This commit is contained in:
parent
7baf493f29
commit
253f125669
3 changed files with 6 additions and 5 deletions
|
@ -10,6 +10,8 @@ cgmath = "*"
|
||||||
prisma = "0.1.1"
|
prisma = "0.1.1"
|
||||||
angular-units = "*"
|
angular-units = "*"
|
||||||
jack = "0.11"
|
jack = "0.11"
|
||||||
|
termion ="*"
|
||||||
|
net2 = "*"
|
||||||
|
|
||||||
[dependencies.async-std]
|
[dependencies.async-std]
|
||||||
version = "1.9.0"
|
version = "1.9.0"
|
||||||
|
|
|
@ -35,6 +35,7 @@ impl Controller {
|
||||||
let inputs = self.inputs.read().unwrap();
|
let inputs = self.inputs.read().unwrap();
|
||||||
let lib = self.library.read().unwrap();
|
let lib = self.library.read().unwrap();
|
||||||
|
|
||||||
|
eprintln!("{}", termion::clear::All);
|
||||||
eprintln!("----------");
|
eprintln!("----------");
|
||||||
|
|
||||||
if inputs.active {
|
if inputs.active {
|
||||||
|
|
|
@ -59,7 +59,7 @@ async fn main() {
|
||||||
vec![
|
vec![
|
||||||
Fixture::new_matrix(),
|
Fixture::new_matrix(),
|
||||||
// .with_driver( Box::new(MatrixTcpDriver::new("ip:port")) ),
|
// .with_driver( Box::new(MatrixTcpDriver::new("ip:port")) ),
|
||||||
/*
|
|
||||||
Fixture::new_stripe(false)
|
Fixture::new_stripe(false)
|
||||||
.with_driver( Box::new(StripeDriver::new("192.168.0.114:4210", socket.clone())) )
|
.with_driver( Box::new(StripeDriver::new("192.168.0.114:4210", socket.clone())) )
|
||||||
.offset(Vector2::new(-0.5, 0.0)),
|
.offset(Vector2::new(-0.5, 0.0)),
|
||||||
|
@ -67,7 +67,7 @@ async fn main() {
|
||||||
Fixture::new_stripe(true)
|
Fixture::new_stripe(true)
|
||||||
.with_driver( Box::new(StripeDriver::new("192.168.0.113:4210", socket.clone())) )
|
.with_driver( Box::new(StripeDriver::new("192.168.0.113:4210", socket.clone())) )
|
||||||
.offset(Vector2::new(-0.4, 0.0)),
|
.offset(Vector2::new(-0.4, 0.0)),
|
||||||
*/
|
|
||||||
Fixture::new_stripe(true)
|
Fixture::new_stripe(true)
|
||||||
.with_driver( Box::new(StripeDriver::new("192.168.0.112:4210", socket.clone())) )
|
.with_driver( Box::new(StripeDriver::new("192.168.0.112:4210", socket.clone())) )
|
||||||
.offset(Vector2::new(0.4, 0.0)),
|
.offset(Vector2::new(0.4, 0.0)),
|
||||||
|
@ -133,17 +133,15 @@ async fn main() {
|
||||||
if src_addr == "192.168.0.112:4210".parse().expect("parse socketaddr") {
|
if src_addr == "192.168.0.112:4210".parse().expect("parse socketaddr") {
|
||||||
lighting_setup.sync_fixture(2);
|
lighting_setup.sync_fixture(2);
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
if src_addr == "192.168.0.113:4210".parse().expect("parse socketaddr") {
|
if src_addr == "192.168.0.113:4210".parse().expect("parse socketaddr") {
|
||||||
lighting_setup.sync_fixture(3);
|
lighting_setup.sync_fixture(3);
|
||||||
}
|
}
|
||||||
if src_addr == "192.168.0.114:4210".parse().expect("parse socketaddr") {
|
if src_addr == "192.168.0.114:4210".parse().expect("parse socketaddr") {
|
||||||
lighting_setup.sync_fixture(4);
|
lighting_setup.sync_fixture(4);
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for i in 1 .. 3 {
|
for i in 1 ..5 {
|
||||||
lighting_setup.update_outputs(i);
|
lighting_setup.update_outputs(i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue