-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixed up post generation to compile.
- Loading branch information
Showing
4 changed files
with
13 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,30 @@ | ||
use copper::config::CopperConfig; | ||
use copper::config::ConfigNode; | ||
use uom::si::rational::Time; | ||
use uom::si::time::second; | ||
|
||
fn main() { | ||
use copper::config::ConfigNode; | ||
use copper::config::CopperConfig; | ||
|
||
let mut copperconfig = CopperConfig::new(); | ||
let mut camera = ConfigNode::new("copper-camera", "camerapkg::Camera").set_base_period(Time::new::<second>(60.into())); | ||
fn main() { | ||
let mut copperconfig = CopperConfig::default(); | ||
let mut camera = ConfigNode::new("copper-camera", "camerapkg::Camera") | ||
.set_base_period(Time::new::<second>(60.into())); | ||
camera.set_param::<i32>("resolution-height", 1080); | ||
camera.set_param::<i32>("resolution-width", 1920); | ||
let mut isp = ConfigNode::new("copper-isp", "isppkg::Isp").set_base_period(Time::new::<second>(1.into())); | ||
let mut isp = | ||
ConfigNode::new("copper-isp", "isppkg::Isp").set_base_period(Time::new::<second>(1.into())); | ||
isp.set_param::<f64>("tone", 1.3); | ||
let algo = ConfigNode::new("copper-algo", "algopkg::Algo").set_base_period(Time::new::<second>(5.into())); | ||
let algo = ConfigNode::new("copper-algo", "algopkg::Algo") | ||
.set_base_period(Time::new::<second>(5.into())); | ||
let n1 = copperconfig.add_node(isp); | ||
let n2 = copperconfig.add_node(camera); | ||
let n3 = copperconfig.add_node(algo); | ||
|
||
copperconfig.connect(n2, n1, "imgmsgpkg::Image"); | ||
copperconfig.connect(n1, n3, "imgmsgpkg::Image"); | ||
println!("{}", copperconfig.serialize()); | ||
|
||
|
||
{ | ||
let mut file = std::fs::File::create("/tmp/copperconfig.dot").unwrap(); | ||
copperconfig.render(&mut file); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters