init from q3k's code dump
This commit is contained in:
commit
bdc3a8e3ae
7 changed files with 4491 additions and 0 deletions
68
hostcontrol/src/main.rs
Normal file
68
hostcontrol/src/main.rs
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
use std::{thread::sleep, time::Duration};
|
||||
|
||||
mod stage;
|
||||
|
||||
fn main() {
|
||||
env_logger::init();
|
||||
let mut s = stage::Stage::new("/dev/ttyACM0", 1.12).unwrap();
|
||||
let origin = nalgebra::vector![3000.0, 0.0, -6000.0];
|
||||
//println!("{}", s.version().unwrap());
|
||||
|
||||
//let a = nalgebra::vector![-10000.0, 0.0, -1250.0];
|
||||
//let b = nalgebra::vector![18000.0, -15000.0, -1600.0];
|
||||
//let c = nalgebra::vector![0.0, -15000.0, -250.0];
|
||||
|
||||
s.move_absolute_cartesian(origin).unwrap();
|
||||
sleep(Duration::from_secs(5));
|
||||
//s.move_absolute_cartesian(origin + a).unwrap();
|
||||
////sleep(Duration::from_secs(5));
|
||||
////s.move_absolute_cartesian(origin).unwrap();
|
||||
////s.move_absolute_cartesian(origin + c).unwrap();
|
||||
////sleep(Duration::from_secs(5));
|
||||
////s.move_absolute_cartesian(origin + nalgebra::vector![0.0, -16000.0, -500.0]).unwrap();
|
||||
////println!("D");
|
||||
////sleep(Duration::from_secs(5));
|
||||
////s.move_absolute_cartesian(origin + nalgebra::vector![0.0, 0.0, 0.0]).unwrap();
|
||||
//println!("{:?}", s.get_position_cartesian());
|
||||
|
||||
//Ok(())
|
||||
}
|
||||
|
||||
struct App {
|
||||
}
|
||||
|
||||
impl Default for App {
|
||||
fn default() -> Self {
|
||||
App {}
|
||||
}
|
||||
}
|
||||
|
||||
impl eframe::App for App {
|
||||
fn update(&mut self, ctx: &egui::Context, _frame: &mut eframe::Frame) {
|
||||
egui::CentralPanel::default().show(ctx, |ui| {
|
||||
ui.heading("My egui Application");
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// let mut s = stage::Stage::new("/dev/ttyACM0", 1.12).unwrap();
|
||||
// let origin = nalgebra::vector![3000.0, 0.0, -6000.0];
|
||||
// println!("{}", s.version().unwrap());
|
||||
//
|
||||
// let a = nalgebra::vector![18000.0, 0.0, -1250.0];
|
||||
// let b = nalgebra::vector![18000.0, -15000.0, -1600.0];
|
||||
// let c = nalgebra::vector![0.0, -15000.0, -250.0];
|
||||
//
|
||||
// s.move_absolute_cartesian(origin).unwrap();
|
||||
// //sleep(Duration::from_secs(5));
|
||||
// //s.move_absolute_cartesian(origin + a).unwrap();
|
||||
// //sleep(Duration::from_secs(5));
|
||||
// //s.move_absolute_cartesian(origin + c).unwrap();
|
||||
// //sleep(Duration::from_secs(5));
|
||||
// //s.move_absolute_cartesian(origin + nalgebra::vector![0.0, -16000.0, -500.0]).unwrap();
|
||||
// //println!("D");
|
||||
// //sleep(Duration::from_secs(5));
|
||||
// //s.move_absolute_cartesian(origin + nalgebra::vector![0.0, 0.0, 0.0]).unwrap();
|
||||
// println!("{:?}", s.get_position_cartesian());
|
||||
//}
|
||||
Loading…
Add table
Add a link
Reference in a new issue