This commit is contained in:
xin
2025-05-07 11:10:44 +08:00
parent 8820b28ab8
commit fb037dbf6f
56 changed files with 2679 additions and 470 deletions

View File

@ -5,7 +5,7 @@ use std::slice;
use crate::serport::serport::*;
use super::STRSensorInfo;
//void IS3SetShutterOpen(int isopen);
type SerialWrite = Option<unsafe extern "C" fn(data: *mut c_uchar, length: size_t) -> size_t>;
#[link(
name = "D:\\06Learn\\rust\\tarui\\myfirst_tauri\\myis11\\project\\is3\\cmake-build-debug-visual-studio/iris_is3lib",
@ -18,6 +18,7 @@ extern "C" {
pub fn IS3OptSnenser(percent:i32) -> i32;
pub fn IS3GetData(outdata: *mut u16, shuttertime: i32) -> i32;
pub fn IS3SetWeaveLenthCoeff(a:*mut f64,length:i32) -> i32;
pub fn IS3SetShutterOpen(isopen: i32) ;
}
@ -78,6 +79,9 @@ pub fn is3_get_data(shuttertime: i32) -> Vec<u16> {
outdata
}
pub fn is3_set_shutter_open(isopen: i32) {
unsafe { IS3SetShutterOpen(isopen) }
}
pub fn is3_set_weave_length_coeff(a: Vec<f64>) -> i32 {
let mut a = a.clone();