added basic controller
This commit is contained in:
parent
8a972cd660
commit
e717238727
1 changed files with 1105 additions and 191 deletions
|
|
@ -61,9 +61,9 @@ async fn telemetry_server() -> Result<()>{
|
|||
tokio::spawn(async move {
|
||||
let mut reader = BufReader::new(receiver).lines();
|
||||
while let Some(line) = reader.next_line().await? {
|
||||
println!("recv: {line}");
|
||||
//println!("recv: {line}");
|
||||
if let result::Result::Ok(control) = serde_json::from_str::<Control>(&line) {
|
||||
println!("deserialized: data is {}", control.data);
|
||||
//println!("deserialized: data is {}", control.data);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -95,7 +95,7 @@ async fn telemetry_server() -> Result<()>{
|
|||
async fn camera_manager(await_frame: Arc<Notify>, latest_frame: Arc<RwLock<Vec<u8>>>) -> Result<()>{
|
||||
let cameras = nokhwa::query(ApiBackend::Auto)?;
|
||||
|
||||
let camera = cameras.get(0).context("no cameras")?;
|
||||
let camera = cameras.get(2).context("no cameras")?;
|
||||
println!("using: {}",camera.human_name());
|
||||
|
||||
let requested = RequestedFormat::new::<RgbFormat>(RequestedFormatType::HighestResolution(Resolution::new(320, 240)));
|
||||
|
|
|
|||
Loading…
Reference in a new issue