fix propagation to dac stream
This commit is contained in:
parent
2d909f771d
commit
3854fe893d
1 changed files with 5 additions and 2 deletions
|
@ -445,6 +445,7 @@ fn laser_frame_producer(model: &mut LaserModel, frame: &mut laser::Frame){
|
||||||
// split by blanked points
|
// split by blanked points
|
||||||
let lines = split_on_blank(new_laser_points);
|
let lines = split_on_blank(new_laser_points);
|
||||||
for line in lines {
|
for line in lines {
|
||||||
|
dbg!("Line: {:?}", &line);
|
||||||
frame.add_lines(line);
|
frame.add_lines(line);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1230,12 +1231,14 @@ fn laser_mouse_moved(app: &App, model: &mut GuiModel, pos: Point2) {
|
||||||
let point = config.filters.homography.move_dac_point(*map_idx, [laser_x, laser_y]);
|
let point = config.filters.homography.move_dac_point(*map_idx, [laser_x, laser_y]);
|
||||||
|
|
||||||
// 3. update config in laser stream threat
|
// 3. update config in laser stream threat
|
||||||
let mat = config.filters.homography.homography_matrix.clone();
|
|
||||||
|
// 3. update config in laser stream threat
|
||||||
|
let homography = config.filters.homography.clone();
|
||||||
|
|
||||||
let selected_laser_stream = model.laser_streams.get(&dac_id);
|
let selected_laser_stream = model.laser_streams.get(&dac_id);
|
||||||
if let Some(stream) = selected_laser_stream {
|
if let Some(stream) = selected_laser_stream {
|
||||||
stream.send(move |laser_model: &mut LaserModel| {
|
stream.send(move |laser_model: &mut LaserModel| {
|
||||||
laser_model.config.filters.homography.homography_matrix = mat
|
laser_model.config.filters.homography = homography
|
||||||
}).unwrap();
|
}).unwrap();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue