Started to integrate the webinterface
This commit is contained in:
parent
b9437480e1
commit
f2fe686b0e
7 changed files with 694 additions and 67 deletions
|
|
@ -1,3 +1,4 @@
|
|||
use anyhow::Result;
|
||||
use log::{debug, error, info, warn};
|
||||
use tokio::{
|
||||
self,
|
||||
|
|
@ -9,7 +10,10 @@ use tokio::{
|
|||
|
||||
use crate::rotctlprotocol::{parse_command, Command};
|
||||
|
||||
pub async fn control_rotor(mut rx_cmd: mpsc::Receiver<Command>, pos_tx: watch::Sender<(f32, f32)>) {
|
||||
pub async fn control_rotor(
|
||||
mut rx_cmd: mpsc::Receiver<Command>,
|
||||
pos_tx: watch::Sender<(f32, f32)>,
|
||||
) -> Result<()> {
|
||||
let mut actual_az = 0.0;
|
||||
let mut actual_el = 0.0;
|
||||
|
||||
|
|
@ -43,7 +47,7 @@ pub async fn control_rotor(mut rx_cmd: mpsc::Receiver<Command>, pos_tx: watch::S
|
|||
|
||||
pos_tx.send((actual_az, actual_el)).unwrap();
|
||||
},
|
||||
else => return
|
||||
else => return Ok(())
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue