rust
This commit is contained in:
@ -1,108 +0,0 @@
|
|||||||
{
|
|
||||||
"cmake" :
|
|
||||||
{
|
|
||||||
"generator" :
|
|
||||||
{
|
|
||||||
"multiConfig" : false,
|
|
||||||
"name" : "Ninja"
|
|
||||||
},
|
|
||||||
"paths" :
|
|
||||||
{
|
|
||||||
"cmake" : "C:/Users/xin/AppData/Local/Programs/CLion/bin/cmake/win/x64/bin/cmake.exe",
|
|
||||||
"cpack" : "C:/Users/xin/AppData/Local/Programs/CLion/bin/cmake/win/x64/bin/cpack.exe",
|
|
||||||
"ctest" : "C:/Users/xin/AppData/Local/Programs/CLion/bin/cmake/win/x64/bin/ctest.exe",
|
|
||||||
"root" : "C:/Users/xin/AppData/Local/Programs/CLion/bin/cmake/win/x64/share/cmake-3.30"
|
|
||||||
},
|
|
||||||
"version" :
|
|
||||||
{
|
|
||||||
"isDirty" : false,
|
|
||||||
"major" : 3,
|
|
||||||
"minor" : 30,
|
|
||||||
"patch" : 5,
|
|
||||||
"string" : "3.30.5",
|
|
||||||
"suffix" : ""
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"objects" :
|
|
||||||
[
|
|
||||||
{
|
|
||||||
"jsonFile" : "codemodel-v2-e326b02e19b443cd6b2e.json",
|
|
||||||
"kind" : "codemodel",
|
|
||||||
"version" :
|
|
||||||
{
|
|
||||||
"major" : 2,
|
|
||||||
"minor" : 7
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"jsonFile" : "cache-v2-994f0ace060520f5a600.json",
|
|
||||||
"kind" : "cache",
|
|
||||||
"version" :
|
|
||||||
{
|
|
||||||
"major" : 2,
|
|
||||||
"minor" : 0
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"jsonFile" : "cmakeFiles-v1-b9e6e445448b9bbd21bb.json",
|
|
||||||
"kind" : "cmakeFiles",
|
|
||||||
"version" :
|
|
||||||
{
|
|
||||||
"major" : 1,
|
|
||||||
"minor" : 1
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"jsonFile" : "toolchains-v1-d19162570acee6f721be.json",
|
|
||||||
"kind" : "toolchains",
|
|
||||||
"version" :
|
|
||||||
{
|
|
||||||
"major" : 1,
|
|
||||||
"minor" : 0
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"reply" :
|
|
||||||
{
|
|
||||||
"cache-v2" :
|
|
||||||
{
|
|
||||||
"jsonFile" : "cache-v2-994f0ace060520f5a600.json",
|
|
||||||
"kind" : "cache",
|
|
||||||
"version" :
|
|
||||||
{
|
|
||||||
"major" : 2,
|
|
||||||
"minor" : 0
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"cmakeFiles-v1" :
|
|
||||||
{
|
|
||||||
"jsonFile" : "cmakeFiles-v1-b9e6e445448b9bbd21bb.json",
|
|
||||||
"kind" : "cmakeFiles",
|
|
||||||
"version" :
|
|
||||||
{
|
|
||||||
"major" : 1,
|
|
||||||
"minor" : 1
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"codemodel-v2" :
|
|
||||||
{
|
|
||||||
"jsonFile" : "codemodel-v2-e326b02e19b443cd6b2e.json",
|
|
||||||
"kind" : "codemodel",
|
|
||||||
"version" :
|
|
||||||
{
|
|
||||||
"major" : 2,
|
|
||||||
"minor" : 7
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"toolchains-v1" :
|
|
||||||
{
|
|
||||||
"jsonFile" : "toolchains-v1-d19162570acee6f721be.json",
|
|
||||||
"kind" : "toolchains",
|
|
||||||
"version" :
|
|
||||||
{
|
|
||||||
"major" : 1,
|
|
||||||
"minor" : 0
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
Binary file not shown.
@ -1,75 +1,9 @@
|
|||||||
# ninja log v6
|
# ninja log v6
|
||||||
3 60 7629305979910560 CMakeFiles/iris_is3lib.dir/D_/06Learn/rust/tarui/myfirst_tauri/myis11/src/thirdpart/iris_proto_tool/src/IRIS_Method.cpp.obj a6f721e923c9fee4
|
3 60 7629305979910560 CMakeFiles/iris_is3lib.dir/D_/06Learn/rust/tarui/myfirst_tauri/myis11/src/thirdpart/iris_proto_tool/src/IRIS_Method.cpp.obj a6f721e923c9fee4
|
||||||
2 323 7647668207730094 CMakeFiles/is3test.dir/testmain.cpp.obj f9a821fdc5f4dfa5
|
|
||||||
4 695 7647725087972280 CMakeFiles/iris_is3lib.dir/D_/06Learn/rust/tarui/myfirst_tauri/myis11/src/IRIS_IS3/IS3_INST.cpp.obj 4cf07b1ddd923f7f
|
|
||||||
2 621 7647723769663691 CMakeFiles/iris_is3lib.dir/D_/06Learn/rust/tarui/myfirst_tauri/myis11/src/IRIS_IS3/SensorIS3.cpp.obj 1760a32e6d699e47
|
|
||||||
696 1366 7647725094890206 iris_is3lib.lib 5b4e6d9afd7a8d3b
|
|
||||||
11 1141 7644844186393719 CMakeFiles/iris_is3lib.dir/D_/06Learn/rust/tarui/myfirst_tauri/myis11/src/IRIS_IS3/IS3Comon.cpp.obj d4b2b2a6612cce8d
|
|
||||||
323 803 7647668210938817 is3test.exe e3d0835beaceb407
|
|
||||||
696 1366 7647725094890206 iris_is3lib.dll 5b4e6d9afd7a8d3b
|
|
||||||
14 1299 7648301151326171 CMakeFiles/iris_is3lib.dir/D_/06Learn/rust/tarui/myfirst_tauri/myis11/src/IRIS_IS3/IS3_INST.cpp.obj 4cf07b1ddd923f7f
|
|
||||||
6 1333 7648301151246472 CMakeFiles/iris_is3lib.dir/D_/06Learn/rust/tarui/myfirst_tauri/myis11/src/IRIS_IS3/SensorIS3.cpp.obj 1760a32e6d699e47
|
|
||||||
2 819 7648301373364431 CMakeFiles/iris_is3lib.dir/D_/06Learn/rust/tarui/myfirst_tauri/myis11/src/IRIS_IS3/IS3Comon.cpp.obj d4b2b2a6612cce8d
|
|
||||||
819 1591 7648301381524055 iris_is3lib.dll 5b4e6d9afd7a8d3b
|
|
||||||
819 1591 7648301381524055 iris_is3lib.lib 5b4e6d9afd7a8d3b
|
|
||||||
16 1344 7648301855652711 CMakeFiles/iris_is3lib.dir/D_/06Learn/rust/tarui/myfirst_tauri/myis11/src/IRIS_IS3/IS3_INST.cpp.obj 4cf07b1ddd923f7f
|
|
||||||
4 1460 7648301855521204 CMakeFiles/iris_is3lib.dir/D_/06Learn/rust/tarui/myfirst_tauri/myis11/src/IRIS_IS3/SensorIS3.cpp.obj 1760a32e6d699e47
|
|
||||||
27 2478 7648301855757374 CMakeFiles/iris_is3lib.dir/D_/06Learn/rust/tarui/myfirst_tauri/myis11/src/IRIS_IS3/IS3Comon.cpp.obj d4b2b2a6612cce8d
|
|
||||||
2478 3779 7648301880269032 iris_is3lib.dll 5b4e6d9afd7a8d3b
|
|
||||||
2478 3779 7648301880269032 iris_is3lib.lib 5b4e6d9afd7a8d3b
|
|
||||||
3 1991 7648302028918061 CMakeFiles/iris_is3lib.dir/D_/06Learn/rust/tarui/myfirst_tauri/myis11/src/IRIS_IS3/IS3Comon.cpp.obj d4b2b2a6612cce8d
|
|
||||||
1991 3156 7648302048797920 iris_is3lib.dll 5b4e6d9afd7a8d3b
|
|
||||||
1991 3156 7648302048797920 iris_is3lib.lib 5b4e6d9afd7a8d3b
|
|
||||||
3 847 7648310892454169 CMakeFiles/iris_is3lib.dir/D_/06Learn/rust/tarui/myfirst_tauri/myis11/src/IRIS_IS3/IS3Comon.cpp.obj d4b2b2a6612cce8d
|
|
||||||
847 1230 7648310900894137 iris_is3lib.dll 5b4e6d9afd7a8d3b
|
|
||||||
847 1230 7648310900894137 iris_is3lib.lib 5b4e6d9afd7a8d3b
|
|
||||||
4 2066 7648311678643451 CMakeFiles/iris_is3lib.dir/D_/06Learn/rust/tarui/myfirst_tauri/myis11/src/IRIS_IS3/IS3Comon.cpp.obj d4b2b2a6612cce8d
|
|
||||||
2066 2996 7648311699274240 iris_is3lib.dll 5b4e6d9afd7a8d3b
|
|
||||||
2066 2996 7648311699274240 iris_is3lib.lib 5b4e6d9afd7a8d3b
|
|
||||||
5 2021 7648315129897831 CMakeFiles/iris_is3lib.dir/D_/06Learn/rust/tarui/myfirst_tauri/myis11/src/IRIS_IS3/IS3Comon.cpp.obj d4b2b2a6612cce8d
|
|
||||||
2022 3371 7648315150080900 iris_is3lib.dll 5b4e6d9afd7a8d3b
|
|
||||||
2022 3371 7648315150080900 iris_is3lib.lib 5b4e6d9afd7a8d3b
|
|
||||||
2 1364 7648556791562549 CMakeFiles/iris_is3lib.dir/D_/06Learn/rust/tarui/myfirst_tauri/myis11/src/IRIS_IS3/IS3Comon.cpp.obj d4b2b2a6612cce8d
|
|
||||||
1365 2111 7648556805190661 iris_is3lib.dll 5b4e6d9afd7a8d3b
|
|
||||||
1365 2111 7648556805190661 iris_is3lib.lib 5b4e6d9afd7a8d3b
|
|
||||||
7 2468 7648558369448975 CMakeFiles/iris_is3lib.dir/D_/06Learn/rust/tarui/myfirst_tauri/myis11/src/IRIS_IS3/IS3Comon.cpp.obj d4b2b2a6612cce8d
|
|
||||||
2469 4862 7648558394069943 iris_is3lib.dll 5b4e6d9afd7a8d3b
|
|
||||||
2469 4862 7648558394069943 iris_is3lib.lib 5b4e6d9afd7a8d3b
|
|
||||||
27 1534 7659530823093737 CMakeFiles/iris_is3lib.dir/D_/06Learn/rust/tarui/myfirst_tauri/myis11/src/IRIS_IS3/SensorIS3.cpp.obj 1760a32e6d699e47
|
|
||||||
45 1537 7659530823267783 CMakeFiles/iris_is3lib.dir/D_/06Learn/rust/tarui/myfirst_tauri/myis11/src/IRIS_IS3/IS3_INST.cpp.obj 4cf07b1ddd923f7f
|
|
||||||
61 1539 7659530823427016 CMakeFiles/is3test.dir/testmain.cpp.obj f9a821fdc5f4dfa5
|
|
||||||
52 1870 7659530823343095 CMakeFiles/iris_is3lib.dir/D_/06Learn/rust/tarui/myfirst_tauri/myis11/src/IRIS_IS3/IS3Comon.cpp.obj d4b2b2a6612cce8d
|
|
||||||
1870 2801 7659530844002496 iris_is3lib.dll 5b4e6d9afd7a8d3b
|
|
||||||
1870 2801 7659530844002496 iris_is3lib.lib 5b4e6d9afd7a8d3b
|
|
||||||
2807 3576 7659530850884136 is3test.exe e3d0835beaceb407
|
|
||||||
2 362 7659531091789070 CMakeFiles/is3test.dir/testmain.cpp.obj f9a821fdc5f4dfa5
|
|
||||||
362 877 7659531095396844 is3test.exe e3d0835beaceb407
|
|
||||||
2 1058 7659575529047811 CMakeFiles/is3test.dir/testmain.cpp.obj f9a821fdc5f4dfa5
|
|
||||||
1059 1728 7659575539628497 is3test.exe e3d0835beaceb407
|
|
||||||
3 1133 7659595832311402 CMakeFiles/iris_is3lib.dir/D_/06Learn/rust/tarui/myfirst_tauri/myis11/src/IRIS_IS3/SensorIS3.cpp.obj 1760a32e6d699e47
|
|
||||||
1134 1905 7659595843630372 iris_is3lib.dll 5b4e6d9afd7a8d3b
|
|
||||||
1134 1905 7659595843630372 iris_is3lib.lib 5b4e6d9afd7a8d3b
|
|
||||||
6 1834 7659604039413995 CMakeFiles/iris_is3lib.dir/D_/06Learn/rust/tarui/myfirst_tauri/myis11/src/IRIS_IS3/IS3Comon.cpp.obj d4b2b2a6612cce8d
|
|
||||||
1835 2466 7659604057692676 iris_is3lib.dll 5b4e6d9afd7a8d3b
|
|
||||||
1835 2466 7659604057692676 iris_is3lib.lib 5b4e6d9afd7a8d3b
|
|
||||||
3 1528 7659605136374824 CMakeFiles/iris_is3lib.dir/D_/06Learn/rust/tarui/myfirst_tauri/myis11/src/IRIS_IS3/IS3Comon.cpp.obj d4b2b2a6612cce8d
|
|
||||||
1529 2637 7659605151634600 iris_is3lib.dll 5b4e6d9afd7a8d3b
|
|
||||||
1529 2637 7659605151634600 iris_is3lib.lib 5b4e6d9afd7a8d3b
|
|
||||||
4 1093 7659606426153089 CMakeFiles/iris_is3lib.dir/D_/06Learn/rust/tarui/myfirst_tauri/myis11/src/IRIS_IS3/IS3Comon.cpp.obj d4b2b2a6612cce8d
|
|
||||||
1093 1676 7659606437045322 iris_is3lib.dll 5b4e6d9afd7a8d3b
|
|
||||||
1093 1676 7659606437045322 iris_is3lib.lib 5b4e6d9afd7a8d3b
|
|
||||||
4 1078 7659649757606260 CMakeFiles/iris_is3lib.dir/D_/06Learn/rust/tarui/myfirst_tauri/myis11/src/IRIS_IS3/IS3Comon.cpp.obj d4b2b2a6612cce8d
|
|
||||||
1078 1572 7659649768353232 iris_is3lib.dll 5b4e6d9afd7a8d3b
|
|
||||||
1078 1572 7659649768353232 iris_is3lib.lib 5b4e6d9afd7a8d3b
|
|
||||||
4 336 7659649925474676 CMakeFiles/is3test.dir/testmain.cpp.obj f9a821fdc5f4dfa5
|
|
||||||
339 877 7659649928823835 is3test.exe e3d0835beaceb407
|
|
||||||
1 378 7659650322325542 CMakeFiles/is3test.dir/testmain.cpp.obj f9a821fdc5f4dfa5
|
1 378 7659650322325542 CMakeFiles/is3test.dir/testmain.cpp.obj f9a821fdc5f4dfa5
|
||||||
378 857 7659650326089674 is3test.exe e3d0835beaceb407
|
|
||||||
12 904 7659654240820684 CMakeFiles/iris_is3lib.dir/D_/06Learn/rust/tarui/myfirst_tauri/myis11/src/IRIS_IS3/IS3_INST.cpp.obj 4cf07b1ddd923f7f
|
12 904 7659654240820684 CMakeFiles/iris_is3lib.dir/D_/06Learn/rust/tarui/myfirst_tauri/myis11/src/IRIS_IS3/IS3_INST.cpp.obj 4cf07b1ddd923f7f
|
||||||
4 1039 7659654240731033 CMakeFiles/iris_is3lib.dir/D_/06Learn/rust/tarui/myfirst_tauri/myis11/src/IRIS_IS3/SensorIS3.cpp.obj 1760a32e6d699e47
|
|
||||||
22 1641 7659654240906402 CMakeFiles/iris_is3lib.dir/D_/06Learn/rust/tarui/myfirst_tauri/myis11/src/IRIS_IS3/IS3Comon.cpp.obj d4b2b2a6612cce8d
|
|
||||||
1641 2407 7659654257106178 iris_is3lib.dll 5b4e6d9afd7a8d3b
|
|
||||||
1641 2407 7659654257106178 iris_is3lib.lib 5b4e6d9afd7a8d3b
|
|
||||||
2 357 7659654741705661 CMakeFiles/iris_is3lib.dir/D_/06Learn/rust/tarui/myfirst_tauri/myis11/src/IRIS_IS3/SensorIS3.cpp.obj 1760a32e6d699e47
|
2 357 7659654741705661 CMakeFiles/iris_is3lib.dir/D_/06Learn/rust/tarui/myfirst_tauri/myis11/src/IRIS_IS3/SensorIS3.cpp.obj 1760a32e6d699e47
|
||||||
357 811 7659654745261843 iris_is3lib.dll 5b4e6d9afd7a8d3b
|
|
||||||
357 811 7659654745261843 iris_is3lib.lib 5b4e6d9afd7a8d3b
|
357 811 7659654745261843 iris_is3lib.lib 5b4e6d9afd7a8d3b
|
||||||
|
22 1641 7659654240906402 CMakeFiles/iris_is3lib.dir/D_/06Learn/rust/tarui/myfirst_tauri/myis11/src/IRIS_IS3/IS3Comon.cpp.obj d4b2b2a6612cce8d
|
||||||
|
378 857 7659650326089674 is3test.exe e3d0835beaceb407
|
||||||
|
357 811 7659654745261843 iris_is3lib.dll 5b4e6d9afd7a8d3b
|
||||||
|
@ -2,6 +2,6 @@ C:\Users\xin\AppData\Local\Programs\CLion\bin\cmake\win\x64\bin\cmake.exe -DCMAK
|
|||||||
-- FOUND CSerialPort, E:/01MyCode/vcpkg/vcpkgclion/installed/x64-windows/debug/lib/libcserialport.lib
|
-- FOUND CSerialPort, E:/01MyCode/vcpkg/vcpkgclion/installed/x64-windows/debug/lib/libcserialport.lib
|
||||||
-- CSerialPort_INCLUDE_DIR: E:/01MyCode/vcpkg/vcpkgclion/installed/x64-windows/include
|
-- CSerialPort_INCLUDE_DIR: E:/01MyCode/vcpkg/vcpkgclion/installed/x64-windows/include
|
||||||
-- CSerialPort_LIBRARY: E:/01MyCode/vcpkg/vcpkgclion/installed/x64-windows/debug/lib/libcserialport.lib
|
-- CSerialPort_LIBRARY: E:/01MyCode/vcpkg/vcpkgclion/installed/x64-windows/debug/lib/libcserialport.lib
|
||||||
-- Configuring done (0.5s)
|
-- Configuring done (1.2s)
|
||||||
-- Generating done (0.1s)
|
-- Generating done (0.4s)
|
||||||
-- Build files have been written to: D:/06Learn/rust/tarui/myfirst_tauri/myis11/project/is3/cmake-build-debug-visual-studio
|
-- Build files have been written to: D:/06Learn/rust/tarui/myfirst_tauri/myis11/project/is3/cmake-build-debug-visual-studio
|
||||||
|
@ -1,108 +0,0 @@
|
|||||||
{
|
|
||||||
"cmake" :
|
|
||||||
{
|
|
||||||
"generator" :
|
|
||||||
{
|
|
||||||
"multiConfig" : false,
|
|
||||||
"name" : "Ninja"
|
|
||||||
},
|
|
||||||
"paths" :
|
|
||||||
{
|
|
||||||
"cmake" : "C:/Users/xin/AppData/Local/Programs/CLion/bin/cmake/win/x64/bin/cmake.exe",
|
|
||||||
"cpack" : "C:/Users/xin/AppData/Local/Programs/CLion/bin/cmake/win/x64/bin/cpack.exe",
|
|
||||||
"ctest" : "C:/Users/xin/AppData/Local/Programs/CLion/bin/cmake/win/x64/bin/ctest.exe",
|
|
||||||
"root" : "C:/Users/xin/AppData/Local/Programs/CLion/bin/cmake/win/x64/share/cmake-3.30"
|
|
||||||
},
|
|
||||||
"version" :
|
|
||||||
{
|
|
||||||
"isDirty" : false,
|
|
||||||
"major" : 3,
|
|
||||||
"minor" : 30,
|
|
||||||
"patch" : 5,
|
|
||||||
"string" : "3.30.5",
|
|
||||||
"suffix" : ""
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"objects" :
|
|
||||||
[
|
|
||||||
{
|
|
||||||
"jsonFile" : "codemodel-v2-99730e62ec2ed81c9bac.json",
|
|
||||||
"kind" : "codemodel",
|
|
||||||
"version" :
|
|
||||||
{
|
|
||||||
"major" : 2,
|
|
||||||
"minor" : 7
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"jsonFile" : "cache-v2-0f18b89672dc3b16b114.json",
|
|
||||||
"kind" : "cache",
|
|
||||||
"version" :
|
|
||||||
{
|
|
||||||
"major" : 2,
|
|
||||||
"minor" : 0
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"jsonFile" : "cmakeFiles-v1-46d31f2f1494827a5db2.json",
|
|
||||||
"kind" : "cmakeFiles",
|
|
||||||
"version" :
|
|
||||||
{
|
|
||||||
"major" : 1,
|
|
||||||
"minor" : 1
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"jsonFile" : "toolchains-v1-d19162570acee6f721be.json",
|
|
||||||
"kind" : "toolchains",
|
|
||||||
"version" :
|
|
||||||
{
|
|
||||||
"major" : 1,
|
|
||||||
"minor" : 0
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"reply" :
|
|
||||||
{
|
|
||||||
"cache-v2" :
|
|
||||||
{
|
|
||||||
"jsonFile" : "cache-v2-0f18b89672dc3b16b114.json",
|
|
||||||
"kind" : "cache",
|
|
||||||
"version" :
|
|
||||||
{
|
|
||||||
"major" : 2,
|
|
||||||
"minor" : 0
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"cmakeFiles-v1" :
|
|
||||||
{
|
|
||||||
"jsonFile" : "cmakeFiles-v1-46d31f2f1494827a5db2.json",
|
|
||||||
"kind" : "cmakeFiles",
|
|
||||||
"version" :
|
|
||||||
{
|
|
||||||
"major" : 1,
|
|
||||||
"minor" : 1
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"codemodel-v2" :
|
|
||||||
{
|
|
||||||
"jsonFile" : "codemodel-v2-99730e62ec2ed81c9bac.json",
|
|
||||||
"kind" : "codemodel",
|
|
||||||
"version" :
|
|
||||||
{
|
|
||||||
"major" : 2,
|
|
||||||
"minor" : 7
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"toolchains-v1" :
|
|
||||||
{
|
|
||||||
"jsonFile" : "toolchains-v1-d19162570acee6f721be.json",
|
|
||||||
"kind" : "toolchains",
|
|
||||||
"version" :
|
|
||||||
{
|
|
||||||
"major" : 1,
|
|
||||||
"minor" : 0
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
Binary file not shown.
@ -1,47 +1,11 @@
|
|||||||
# ninja log v6
|
# ninja log v6
|
||||||
6 51 7628587486153392 CMakeFiles/iris_is3lib.dir/D_/06Learn/rust/tarui/myfirst_tauri/myis11/src/thirdpart/iris_proto_tool/src/IRIS_Method.c.obj a4c0fbb7022be8d5
|
6 51 7628587486153392 CMakeFiles/iris_is3lib.dir/D_/06Learn/rust/tarui/myfirst_tauri/myis11/src/thirdpart/iris_proto_tool/src/IRIS_Method.c.obj a4c0fbb7022be8d5
|
||||||
11 562 7630155613545132 CMakeFiles/iris_is3lib.dir/D_/06Learn/rust/tarui/myfirst_tauri/myis11/src/IRIS_IS3/IS3_INST.cpp.obj 3c5858a3264438b4
|
|
||||||
2 226 7628600422878105 CMakeFiles/is3test.dir/testmain.cpp.obj 905a72b1ea8bf22c
|
|
||||||
8 707 7630155613515936 CMakeFiles/iris_is3lib.dir/D_/06Learn/rust/tarui/myfirst_tauri/myis11/src/IRIS_IS3/SensorIS3.cpp.obj 96f167c4e5f0d851
|
|
||||||
1 71 7644824241211710 build.ninja 7106bca1f4b570da
|
|
||||||
16 923 7630155613603555 CMakeFiles/iris_is3lib.dir/D_/06Learn/rust/tarui/myfirst_tauri/myis11/src/IRIS_IS3/IS3Comon.cpp.obj 4364cfe7f408eeb7
|
|
||||||
4 94 7630155613477022 CMakeFiles/iris_is3lib.dir/D_/06Learn/rust/tarui/myfirst_tauri/myis11/src/thirdpart/iris_proto_tool/src/IRIS_Method.cpp.obj 366a7a8636d2dadc
|
|
||||||
923 1353 7630155624002331 iris_is3lib.dll c7564dfa3e9c17a2
|
|
||||||
923 1353 7630155624002331 iris_is3lib.lib c7564dfa3e9c17a2
|
|
||||||
226 699 7628600425121007 is3test.exe 81439074008edbcf
|
|
||||||
99 2103 7645928170856662 CMakeFiles/is3test.dir/testmain.cpp.obj 905a72b1ea8bf22c
|
|
||||||
58 2187 7645928170446223 CMakeFiles/iris_is3lib.dir/D_/06Learn/rust/tarui/myfirst_tauri/myis11/src/IRIS_IS3/IS3_INST.cpp.obj 3c5858a3264438b4
|
|
||||||
36 2710 7645928170231553 CMakeFiles/iris_is3lib.dir/D_/06Learn/rust/tarui/myfirst_tauri/myis11/src/IRIS_IS3/SensorIS3.cpp.obj 96f167c4e5f0d851
|
|
||||||
82 3348 7645928170696253 CMakeFiles/iris_is3lib.dir/D_/06Learn/rust/tarui/myfirst_tauri/myis11/src/IRIS_IS3/IS3Comon.cpp.obj 4364cfe7f408eeb7
|
|
||||||
3348 4703 7645928203343429 iris_is3lib.dll c7564dfa3e9c17a2
|
|
||||||
3348 4703 7645928203343429 iris_is3lib.lib c7564dfa3e9c17a2
|
|
||||||
4703 6154 7645928216902976 is3test.exe 81439074008edbcf
|
|
||||||
43 730 7647455036245039 CMakeFiles/iris_is3lib.dir/D_/06Learn/rust/tarui/myfirst_tauri/myis11/src/IRIS_IS3/IS3_INST.cpp.obj 3c5858a3264438b4
|
|
||||||
731 1199 7647455043120089 iris_is3lib.dll c7564dfa3e9c17a2
|
|
||||||
731 1199 7647455043120089 iris_is3lib.lib c7564dfa3e9c17a2
|
|
||||||
14 630 7648500587606143 CMakeFiles/iris_is3lib.dir/D_/06Learn/rust/tarui/myfirst_tauri/myis11/src/IRIS_IS3/IS3_INST.cpp.obj 3c5858a3264438b4
|
|
||||||
29 634 7648500587759276 CMakeFiles/is3test.dir/testmain.cpp.obj 905a72b1ea8bf22c
|
|
||||||
5 772 7648500587511331 CMakeFiles/iris_is3lib.dir/D_/06Learn/rust/tarui/myfirst_tauri/myis11/src/IRIS_IS3/SensorIS3.cpp.obj 96f167c4e5f0d851
|
|
||||||
23 994 7648500587693062 CMakeFiles/iris_is3lib.dir/D_/06Learn/rust/tarui/myfirst_tauri/myis11/src/IRIS_IS3/IS3Comon.cpp.obj 4364cfe7f408eeb7
|
|
||||||
994 1538 7648500598479353 iris_is3lib.dll c7564dfa3e9c17a2
|
|
||||||
994 1538 7648500598479353 iris_is3lib.lib c7564dfa3e9c17a2
|
|
||||||
1539 2009 7648500602854169 is3test.exe 81439074008edbcf
|
|
||||||
6 1220 7648555698015582 CMakeFiles/iris_is3lib.dir/D_/06Learn/rust/tarui/myfirst_tauri/myis11/src/IRIS_IS3/IS3Comon.cpp.obj 4364cfe7f408eeb7
|
|
||||||
1221 1896 7648555710168977 iris_is3lib.dll c7564dfa3e9c17a2
|
|
||||||
1221 1896 7648555710168977 iris_is3lib.lib c7564dfa3e9c17a2
|
|
||||||
2 730 7648556753624547 CMakeFiles/iris_is3lib.dir/D_/06Learn/rust/tarui/myfirst_tauri/myis11/src/IRIS_IS3/IS3Comon.cpp.obj 4364cfe7f408eeb7
|
|
||||||
731 1321 7648556760919003 iris_is3lib.dll c7564dfa3e9c17a2
|
|
||||||
731 1321 7648556760919003 iris_is3lib.lib c7564dfa3e9c17a2
|
|
||||||
21 907 7659725145667238 CMakeFiles/iris_is3lib.dir/D_/06Learn/rust/tarui/myfirst_tauri/myis11/src/IRIS_IS3/IS3_INST.cpp.obj 3c5858a3264438b4
|
21 907 7659725145667238 CMakeFiles/iris_is3lib.dir/D_/06Learn/rust/tarui/myfirst_tauri/myis11/src/IRIS_IS3/IS3_INST.cpp.obj 3c5858a3264438b4
|
||||||
33 941 7659725145778173 CMakeFiles/is3test.dir/testmain.cpp.obj 905a72b1ea8bf22c
|
33 941 7659725145778173 CMakeFiles/is3test.dir/testmain.cpp.obj 905a72b1ea8bf22c
|
||||||
12 1146 7659725145573082 CMakeFiles/iris_is3lib.dir/D_/06Learn/rust/tarui/myfirst_tauri/myis11/src/IRIS_IS3/SensorIS3.cpp.obj 96f167c4e5f0d851
|
|
||||||
27 1400 7659725145725854 CMakeFiles/iris_is3lib.dir/D_/06Learn/rust/tarui/myfirst_tauri/myis11/src/IRIS_IS3/IS3Comon.cpp.obj 4364cfe7f408eeb7
|
|
||||||
1400 2205 7659725161260404 iris_is3lib.dll c7564dfa3e9c17a2
|
|
||||||
1400 2205 7659725161260404 iris_is3lib.lib c7564dfa3e9c17a2
|
|
||||||
2206 3648 7659725167509900 is3test.exe 81439074008edbcf
|
|
||||||
18 1841 7669097762710254 CMakeFiles/iris_is3lib.dir/D_/06Learn/rust/tarui/myfirst_tauri/myis11/src/IRIS_IS3/SensorIS3.cpp.obj 96f167c4e5f0d851
|
|
||||||
1842 2743 7669097780945612 iris_is3lib.dll c7564dfa3e9c17a2
|
|
||||||
1842 2743 7669097780945612 iris_is3lib.lib c7564dfa3e9c17a2
|
|
||||||
2 616 7669134105668608 CMakeFiles/iris_is3lib.dir/D_/06Learn/rust/tarui/myfirst_tauri/myis11/src/IRIS_IS3/SensorIS3.cpp.obj 96f167c4e5f0d851
|
2 616 7669134105668608 CMakeFiles/iris_is3lib.dir/D_/06Learn/rust/tarui/myfirst_tauri/myis11/src/IRIS_IS3/SensorIS3.cpp.obj 96f167c4e5f0d851
|
||||||
|
1 71 7677050246360766 build.ninja 7106bca1f4b570da
|
||||||
|
27 1400 7659725145725854 CMakeFiles/iris_is3lib.dir/D_/06Learn/rust/tarui/myfirst_tauri/myis11/src/IRIS_IS3/IS3Comon.cpp.obj 4364cfe7f408eeb7
|
||||||
|
4 94 7630155613477022 CMakeFiles/iris_is3lib.dir/D_/06Learn/rust/tarui/myfirst_tauri/myis11/src/thirdpart/iris_proto_tool/src/IRIS_Method.cpp.obj 366a7a8636d2dadc
|
||||||
617 1030 7669134111816719 iris_is3lib.dll c7564dfa3e9c17a2
|
617 1030 7669134111816719 iris_is3lib.dll c7564dfa3e9c17a2
|
||||||
617 1030 7669134111816719 iris_is3lib.lib c7564dfa3e9c17a2
|
617 1030 7669134111816719 iris_is3lib.lib c7564dfa3e9c17a2
|
||||||
|
2206 3648 7659725167509900 is3test.exe 81439074008edbcf
|
||||||
|
@ -2,6 +2,6 @@ C:\Users\xin\AppData\Local\Programs\CLion\bin\cmake\win\x64\bin\cmake.exe -DCMAK
|
|||||||
-- FOUND CSerialPort, E:/01MyCode/vcpkg/vcpkgclion/installed/x64-windows/lib/libcserialport.lib
|
-- FOUND CSerialPort, E:/01MyCode/vcpkg/vcpkgclion/installed/x64-windows/lib/libcserialport.lib
|
||||||
-- CSerialPort_INCLUDE_DIR: E:/01MyCode/vcpkg/vcpkgclion/installed/x64-windows/include
|
-- CSerialPort_INCLUDE_DIR: E:/01MyCode/vcpkg/vcpkgclion/installed/x64-windows/include
|
||||||
-- CSerialPort_LIBRARY: E:/01MyCode/vcpkg/vcpkgclion/installed/x64-windows/lib/libcserialport.lib
|
-- CSerialPort_LIBRARY: E:/01MyCode/vcpkg/vcpkgclion/installed/x64-windows/lib/libcserialport.lib
|
||||||
-- Configuring done (0.5s)
|
-- Configuring done (1.2s)
|
||||||
-- Generating done (0.1s)
|
-- Generating done (0.3s)
|
||||||
-- Build files have been written to: D:/06Learn/rust/tarui/myfirst_tauri/myis11/project/is3/cmake-build-release-visual-studio
|
-- Build files have been written to: D:/06Learn/rust/tarui/myfirst_tauri/myis11/project/is3/cmake-build-release-visual-studio
|
||||||
|
@ -31,3 +31,13 @@ pub fn find_peek(data: Vec<f64>, minheigh: f64) -> Vec<(u32, f64)> {
|
|||||||
pub fn compute_weave_coeff(x: Vec<f64>, y: Vec<f64>) -> Vec<f64> {
|
pub fn compute_weave_coeff(x: Vec<f64>, y: Vec<f64>) -> Vec<f64> {
|
||||||
spectraltools::compute_weave_coeff(x, y)
|
spectraltools::compute_weave_coeff(x, y)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
pub fn polynomial_smooth_u32(y: &[u32], degree: usize) -> Vec<u32> {
|
||||||
|
smoothmethod::polynomial_smooth_u32(y, degree)
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn polynomial_smooth_u16(y: Vec<u16>, degree: usize) -> Vec<u16> {
|
||||||
|
|
||||||
|
smoothmethod::polynomial_smooth_u16(&y, degree)
|
||||||
|
}
|
@ -6,7 +6,7 @@ use ndarray_ndimage::{gaussian_filter, BorderMode};
|
|||||||
|
|
||||||
pub fn high_pass_gaussian_filter(input: Vec<f64>, sigma: f64) -> Vec<f64> {
|
pub fn high_pass_gaussian_filter(input: Vec<f64>, sigma: f64) -> Vec<f64> {
|
||||||
// 将输入 Vec<f64> 转换为 Array1<f64>
|
// 将输入 Vec<f64> 转换为 Array1<f64>
|
||||||
let mut input_array = Array1::from_vec(input);
|
let input_array = Array1::from_vec(input);
|
||||||
// for i in 0..input_array.len(){
|
// for i in 0..input_array.len(){
|
||||||
//
|
//
|
||||||
// input_array[i]=input_array[i]*input_array[i]/( 65535f64);
|
// input_array[i]=input_array[i]*input_array[i]/( 65535f64);
|
||||||
@ -16,7 +16,7 @@ pub fn high_pass_gaussian_filter(input: Vec<f64>, sigma: f64) -> Vec<f64> {
|
|||||||
|
|
||||||
|
|
||||||
// 高斯低通滤波
|
// 高斯低通滤波
|
||||||
let mut low_pass = gaussian_filter(&input_array, sigma, 0, BorderMode::Reflect, 3);
|
let low_pass = gaussian_filter(&input_array, sigma, 0, BorderMode::Reflect, 3);
|
||||||
// Modify the result: set values less than zero to zero
|
// Modify the result: set values less than zero to zero
|
||||||
println!("{:?}",low_pass);
|
println!("{:?}",low_pass);
|
||||||
// 高通滤波:原始信号 - 低通滤波结果
|
// 高通滤波:原始信号 - 低通滤波结果
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
extern crate savgol_rs;
|
extern crate savgol_rs;
|
||||||
|
use nalgebra::{DMatrix, DVector};
|
||||||
|
use std::convert::TryFrom;
|
||||||
|
|
||||||
use savgol_rs::savgol_filter;
|
use savgol_rs::savgol_filter;
|
||||||
pub fn savgol(data: Vec<f64>, window: usize, order: usize) -> Vec<f64> {
|
pub fn savgol(data: Vec<f64>, window: usize, order: usize) -> Vec<f64> {
|
||||||
@ -7,7 +9,134 @@ pub fn savgol(data: Vec<f64>, window: usize, order: usize) -> Vec<f64> {
|
|||||||
savgol_filter(&svinput).unwrap()
|
savgol_filter(&svinput).unwrap()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// 多项式拟合函数 (f64版本)
|
||||||
|
///
|
||||||
|
/// 参数:
|
||||||
|
/// - x: x坐标序列
|
||||||
|
/// - y: y坐标序列
|
||||||
|
/// - degree: 多项式次数 (7或8)
|
||||||
|
///
|
||||||
|
/// 返回: 平滑后的y值序列
|
||||||
|
pub fn polynomial_fit_f64(x: &[f64], y: &[f64], degree: usize) -> Vec<f64> {
|
||||||
|
assert_eq!(x.len(), y.len(), "x和y的长度必须相同");
|
||||||
|
if x.len() < degree + 1 {
|
||||||
|
panic!("数据点数量必须大于多项式次数");
|
||||||
|
}
|
||||||
|
let n = x.len();
|
||||||
|
let y_vec = DVector::from_vec(y.to_vec());
|
||||||
|
// 构建范德蒙矩阵
|
||||||
|
let mut vandermonde = DMatrix::zeros(n, degree + 1);
|
||||||
|
for i in 0..n {
|
||||||
|
for j in 0..=degree {
|
||||||
|
vandermonde[(i, j)] = x[i].powi(j as i32);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 解最小二乘问题 - 新版本nalgebra的调用方式
|
||||||
|
let svd = vandermonde.svd(true, true);
|
||||||
|
let coefficients = svd.solve(&y_vec, f64::EPSILON).unwrap();
|
||||||
|
// 计算拟合值
|
||||||
|
let fitted_y: Vec<f64> = x
|
||||||
|
.iter()
|
||||||
|
.map(|&xi| {
|
||||||
|
(0..=degree).fold(0.0, |acc, j| acc + coefficients[j] * xi.powi(j as i32))
|
||||||
|
})
|
||||||
|
.collect();
|
||||||
|
fitted_y
|
||||||
|
}
|
||||||
|
/// 多项式拟合函数 (u32版本)
|
||||||
|
///
|
||||||
|
/// 参数:
|
||||||
|
/// - x: x坐标序列
|
||||||
|
/// - y: y坐标序列
|
||||||
|
/// - degree: 多项式次数 (7或8)
|
||||||
|
///
|
||||||
|
/// 返回: 平滑后的y值序列
|
||||||
|
pub fn polynomial_fit_u32(x: &[u32], y: &[u32], degree: usize) -> Vec<u32> {
|
||||||
|
// 转换为f64处理
|
||||||
|
let x_f64: Vec<f64> = x.iter().map(|&xi| xi as f64).collect();
|
||||||
|
let y_f64: Vec<f64> = y.iter().map(|&yi| yi as f64).collect();
|
||||||
|
|
||||||
|
let fitted_f64 = polynomial_fit_f64(&x_f64, &y_f64, degree);
|
||||||
|
|
||||||
|
// 转换回u32,处理可能的负值(截断为0)和溢出
|
||||||
|
fitted_f64
|
||||||
|
.into_iter()
|
||||||
|
.map(|y| {
|
||||||
|
if y < 0.0 {
|
||||||
|
0
|
||||||
|
} else {
|
||||||
|
u32::try_from(y.round() as i64).unwrap_or(u32::MAX)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.collect()
|
||||||
|
}
|
||||||
|
/// 简化版:当x是等间距时的平滑函数 (u32版本)
|
||||||
|
pub fn polynomial_smooth_u32(y: &[u32], degree: usize) -> Vec<u32> {
|
||||||
|
let x: Vec<u32> = (0..y.len() as u32).collect();
|
||||||
|
polynomial_fit_u32(&x, y, degree)
|
||||||
|
}
|
||||||
|
/// 多项式拟合函数 (u16版本)
|
||||||
|
pub fn polynomial_fit_u16(x: &[u16], y: &[u16], degree: usize) -> Vec<u16> {
|
||||||
|
let x_f64: Vec<f64> = x.iter().map(|&xi| xi as f64).collect();
|
||||||
|
let y_f64: Vec<f64> = y.iter().map(|&yi| yi as f64).collect();
|
||||||
|
|
||||||
|
let fitted_f64 = polynomial_fit_f64(&x_f64, &y_f64, degree);
|
||||||
|
|
||||||
|
fitted_f64
|
||||||
|
.into_iter()
|
||||||
|
.map(|y| {
|
||||||
|
if y < 0.0 {
|
||||||
|
0
|
||||||
|
} else if y > u16::MAX as f64 {
|
||||||
|
u16::MAX
|
||||||
|
} else {
|
||||||
|
y.round() as u16
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.collect()
|
||||||
|
}
|
||||||
|
/// 简化版:当x是等间距时的平滑函数 (u16版本)
|
||||||
|
pub fn polynomial_smooth_u16(y: &[u16], degree: usize) -> Vec<u16> {
|
||||||
|
let x: Vec<u16> = (0..y.len() as u16).collect();
|
||||||
|
polynomial_fit_u16(&x, y, degree)
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(test)]
|
||||||
|
mod tests {
|
||||||
|
use super::*;
|
||||||
|
#[test]
|
||||||
|
fn test_polynomial_fit() {
|
||||||
|
// 测试数据: 一个简单的二次函数加一些噪声
|
||||||
|
let x = vec![0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0];
|
||||||
|
let y = vec![1.0, 3.0, 6.0, 10.0, 15.0, 24.0, 35.0, 50.0, 65.0, 82.0];
|
||||||
|
|
||||||
|
// 2次多项式拟合应该能很好拟合
|
||||||
|
let fitted = polynomial_fit_f64(&x, &y, 2);
|
||||||
|
assert_eq!(fitted.len(), y.len());
|
||||||
|
|
||||||
|
// 检查拟合结果是否接近原始数据
|
||||||
|
for (original, fitted) in y.iter().zip(fitted.iter()) {
|
||||||
|
assert!((original - fitted).abs() < 5.0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#[test]
|
||||||
|
fn test_polynomial_smooth() {
|
||||||
|
// 测试数据: 一个简单的上升序列加一些噪声
|
||||||
|
let y = vec![
|
||||||
|
10,12,11,13,12,14,13,15,14,16,
|
||||||
|
15,17,16,18,17,19,18,20,19,21,
|
||||||
|
];
|
||||||
|
|
||||||
|
// 7次多项式平滑
|
||||||
|
let smoothed_7 = polynomial_smooth_u32(&y, 7);
|
||||||
|
print!("smoothed_7: {:?}", smoothed_7);
|
||||||
|
assert_eq!(smoothed_7.len(), y.len());
|
||||||
|
|
||||||
|
// 8次多项式平滑
|
||||||
|
let smoothed_8 = polynomial_smooth_u32(&y, 8);
|
||||||
|
assert_eq!(smoothed_8.len(), y.len());
|
||||||
|
}
|
||||||
|
}
|
||||||
#[test]
|
#[test]
|
||||||
fn test_savgol() {
|
fn test_savgol() {
|
||||||
// 示例数据
|
// 示例数据
|
||||||
|
@ -39,7 +39,7 @@ pub fn interpolate_spline<T: Copy + Into<f64>,>(x_t: Vec<T>, y_t: Vec<T>, step:
|
|||||||
Ok(result)
|
Ok(result)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn interpolate_spline_at_points<T: Copy + Into<f64>>(x_t: Vec<T>, y_t: Vec<T>, x_target: Vec<f64>) -> Result<Vec<(f64)>, Box<dyn Error>> {
|
pub fn interpolate_spline_at_points<T: Copy + Into<f64>>(x_t: Vec<T>, y_t: Vec<T>, x_target: Vec<f64>) -> Result<Vec<f64>, Box<dyn Error>> {
|
||||||
let x: Vec<f64> = x_t.iter().map(|&x| x.into()).collect();
|
let x: Vec<f64> = x_t.iter().map(|&x| x.into()).collect();
|
||||||
let y: Vec<f64> = y_t.iter().map(|&y| y.into()).collect();
|
let y: Vec<f64> = y_t.iter().map(|&y| y.into()).collect();
|
||||||
|
|
||||||
@ -138,7 +138,7 @@ pub fn compute_weave_coeff(x_data:Vec<f64>,y_data:Vec<f64>)->Vec<f64>{
|
|||||||
|
|
||||||
// 构建设计矩阵 X 和观测向量 y
|
// 构建设计矩阵 X 和观测向量 y
|
||||||
let mut x_matrix = DMatrix::zeros(n, 4); // 三阶多项式有 4 个系数
|
let mut x_matrix = DMatrix::zeros(n, 4); // 三阶多项式有 4 个系数
|
||||||
let mut y_vector = DVector::from_vec(y_data.clone());
|
let y_vector = DVector::from_vec(y_data.clone());
|
||||||
|
|
||||||
for (i, &x) in x_data.iter().enumerate() {
|
for (i, &x) in x_data.iter().enumerate() {
|
||||||
x_matrix[(i, 0)] = 1.0; // 常数项
|
x_matrix[(i, 0)] = 1.0; // 常数项
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
|
|
||||||
use super::serport::serport::*;
|
use super::serport::serport::*;
|
||||||
use super::mylog::*;
|
|
||||||
|
|
||||||
|
|
||||||
#[tauri::command]
|
#[tauri::command]
|
||||||
|
@ -1,9 +1,7 @@
|
|||||||
use super::mydefine::*;
|
use super::mydefine::*;
|
||||||
pub mod spectralserver;
|
pub mod spectralserver;
|
||||||
pub mod spectralbase;
|
pub mod spectralbase;
|
||||||
use std::fmt::format;
|
|
||||||
use std::fs;
|
use std::fs;
|
||||||
use std::fs::File;
|
|
||||||
use super::mylog::*;
|
use super::mylog::*;
|
||||||
use serde_json::json;
|
use serde_json::json;
|
||||||
use spectralserver::calibrate_file;
|
use spectralserver::calibrate_file;
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
use libc::{c_uchar,c_char,c_long,c_float, size_t};
|
use libc::{c_uchar, size_t};
|
||||||
use std::ffi::CStr;
|
|
||||||
use std::slice;
|
use std::slice;
|
||||||
|
|
||||||
use crate::serport::serport::*;
|
use crate::serport::serport::*;
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
use libc::{c_uchar,c_char,c_long,c_float, size_t};
|
use libc::{c_uchar, size_t};
|
||||||
use std::ffi::CStr;
|
|
||||||
use std::slice;
|
use std::slice;
|
||||||
|
|
||||||
use crate::serport::serport::*;
|
use crate::serport::serport::*;
|
||||||
|
@ -7,7 +7,6 @@ use std::{
|
|||||||
};
|
};
|
||||||
mod IS3_sensor;
|
mod IS3_sensor;
|
||||||
mod IS11_sensor;
|
mod IS11_sensor;
|
||||||
|
|
||||||
// 定义emun 不同光谱仪
|
// 定义emun 不同光谱仪
|
||||||
#[derive(Copy, Clone)]
|
#[derive(Copy, Clone)]
|
||||||
pub enum Senortype {
|
pub enum Senortype {
|
||||||
@ -204,11 +203,12 @@ pub fn sensor_get_data(shuttertime: i32) -> Vec<u16> {
|
|||||||
unsafe {
|
unsafe {
|
||||||
|
|
||||||
let len = sensor_get_data_base(outdata.as_mut_ptr(), shuttertime);
|
let len = sensor_get_data_base(outdata.as_mut_ptr(), shuttertime);
|
||||||
outdata.truncate(len as usize);
|
outdata.truncate(len as usize);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
// polynomial_smooth_u16( outdata ,7)
|
||||||
outdata
|
outdata
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,16 +2,12 @@ use super::spectralbase;
|
|||||||
use super::spectralbase::*;
|
use super::spectralbase::*;
|
||||||
use super::super::mydefine::*;
|
use super::super::mydefine::*;
|
||||||
use lazy_static::lazy_static;
|
use lazy_static::lazy_static;
|
||||||
use chrono::{self, format, Datelike, Timelike};
|
use chrono::{self, Datelike, Timelike};
|
||||||
use serde::de;
|
|
||||||
use tauri::http::header::UPGRADE;
|
|
||||||
use std::thread;
|
use std::thread;
|
||||||
use std::fs;
|
|
||||||
use std::fs::File;
|
use std::fs::File;
|
||||||
use std::mem;
|
use std::mem;
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
use std::io::Read;
|
use std::io::Read;
|
||||||
use super::super::algorithm::*;
|
|
||||||
#[derive(PartialEq)]
|
#[derive(PartialEq)]
|
||||||
enum WorkStat {
|
enum WorkStat {
|
||||||
IDLE,
|
IDLE,
|
||||||
@ -132,7 +128,7 @@ pub fn opt_sensor(percent: i32) -> i32 {
|
|||||||
pub fn get_now_stat()->(String,String,i32){
|
pub fn get_now_stat()->(String,String,i32){
|
||||||
|
|
||||||
|
|
||||||
let mut dev_stat=DEV_STAT.lock().unwrap();
|
let dev_stat=DEV_STAT.lock().unwrap();
|
||||||
match dev_stat.stat {
|
match dev_stat.stat {
|
||||||
WorkStat::IDLE => {
|
WorkStat::IDLE => {
|
||||||
return ("finish".to_string(),dev_stat.workname.clone(),100);
|
return ("finish".to_string(),dev_stat.workname.clone(),100);
|
||||||
@ -415,12 +411,12 @@ pub fn calibrate_file(orgdata: &IS11DataStruct) -> IS11DataStruct {
|
|||||||
let cali_gaindb = calidata.temprature[0];
|
let cali_gaindb = calidata.temprature[0];
|
||||||
let cali_shutter = calidata.shutter_time;
|
let cali_shutter = calidata.shutter_time;
|
||||||
//db 转系数
|
//db 转系数
|
||||||
let mut collect_gain = 10.0_f32.powf(collect_gaindb / 20.0);
|
let collect_gain = 10.0_f32.powf(collect_gaindb / 20.0);
|
||||||
let mut cali_gain = 10.0_f32.powf(cali_gaindb / 20.0);
|
let cali_gain = 10.0_f32.powf(cali_gaindb / 20.0);
|
||||||
//计算增益
|
//计算增益
|
||||||
let mut Scale_gain = cali_gain / collect_gain;
|
let Scale_gain = cali_gain / collect_gain;
|
||||||
let mut Scale_shutter = cali_shutter as f32/ collect_shutter as f32;
|
let Scale_shutter = cali_shutter as f32/ collect_shutter as f32;
|
||||||
let mut SCale = Scale_gain * Scale_shutter as f32;
|
let SCale = Scale_gain * Scale_shutter as f32;
|
||||||
let len = orgdata.data.len();
|
let len = orgdata.data.len();
|
||||||
for i in 0..len {
|
for i in 0..len {
|
||||||
data.data[i] = orgdata.data[i] * SCale * calidata.data[i]+offsetdata.data[i];
|
data.data[i] = orgdata.data[i] * SCale * calidata.data[i]+offsetdata.data[i];
|
||||||
|
@ -2,16 +2,12 @@
|
|||||||
use core::str;
|
use core::str;
|
||||||
use std::fs;
|
use std::fs;
|
||||||
use std::fs::File;
|
use std::fs::File;
|
||||||
use std::io::{self, Read, Write};
|
use std::io::{Write};
|
||||||
// use std::sync::WaitTimeoutResult;
|
// use std::sync::WaitTimeoutResult;
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
use super::algorithm::interpolate_spline;
|
|
||||||
use super::algorithm::sg_smooth;
|
|
||||||
use std::mem;
|
use std::mem;
|
||||||
|
|
||||||
use super::mylog::*;
|
use super::mylog::*;
|
||||||
use serde::{Deserialize, Serialize};
|
|
||||||
use serde_with::serde_as;
|
|
||||||
use super::serport::serport::*;
|
use super::serport::serport::*;
|
||||||
use super::mydefine::*;
|
use super::mydefine::*;
|
||||||
|
|
||||||
@ -335,8 +331,8 @@ if command == "\"get_data\"" {
|
|||||||
if datatype == 0x02 {
|
if datatype == 0x02 {
|
||||||
let mut is11data = IS11DataStruct::default();
|
let mut is11data = IS11DataStruct::default();
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut is11data_ptr = &mut is11data as *mut IS11DataStruct;
|
let is11data_ptr = &mut is11data as *mut IS11DataStruct;
|
||||||
let mut ret_ptr = &mut ret[0] as *mut u8;
|
let ret_ptr = &mut ret[0] as *mut u8;
|
||||||
std::ptr::copy_nonoverlapping(
|
std::ptr::copy_nonoverlapping(
|
||||||
ret_ptr,
|
ret_ptr,
|
||||||
is11data_ptr as *mut u8,
|
is11data_ptr as *mut u8,
|
||||||
|
@ -21,9 +21,7 @@ enum DevName {
|
|||||||
}
|
}
|
||||||
|
|
||||||
use lazy_static::lazy_static;
|
use lazy_static::lazy_static;
|
||||||
use tauri::api::version;
|
|
||||||
use std::sync::Mutex;
|
use std::sync::Mutex;
|
||||||
use std::sync::Arc;
|
|
||||||
//设置一个可修改的全局变量
|
//设置一个可修改的全局变量
|
||||||
lazy_static! {
|
lazy_static! {
|
||||||
static ref DEVNAME: Mutex<DevName> = Mutex::new(DevName::IRIS_SENSOR(Senortype::IS3));
|
static ref DEVNAME: Mutex<DevName> = Mutex::new(DevName::IRIS_SENSOR(Senortype::IS3));
|
||||||
|
@ -1,12 +1,11 @@
|
|||||||
use tklog::{
|
use tklog::{
|
||||||
debugs, errors, fatals, infos,
|
infos,
|
||||||
sync::Logger,LEVEL, LOG,
|
sync::Logger, Format, MODE,
|
||||||
traces, warns, Format, MODE,async_traces,
|
|
||||||
};
|
};
|
||||||
use lazy_static::lazy_static;
|
use lazy_static::lazy_static;
|
||||||
use std::{
|
use std::{
|
||||||
// fmt::format,
|
// fmt::format,
|
||||||
borrow::{ BorrowMut}, sync::{Arc, Mutex}, thread::sleep
|
borrow::{ BorrowMut}, sync::{Arc, Mutex}
|
||||||
};
|
};
|
||||||
|
|
||||||
struct LOGERME{
|
struct LOGERME{
|
||||||
@ -31,11 +30,11 @@ lazy_static! {
|
|||||||
|
|
||||||
pub fn change_log_path(path: &str,string: &str) {
|
pub fn change_log_path(path: &str,string: &str) {
|
||||||
if string=="RUST"{
|
if string=="RUST"{
|
||||||
let mut loggerglobel = LOGERGLOBLE.lock().unwrap();
|
let loggerglobel = LOGERGLOBLE.lock().unwrap();
|
||||||
let mut log=loggerglobel.logger_rust.lock().unwrap();
|
let mut log=loggerglobel.logger_rust.lock().unwrap();
|
||||||
log.set_cutmode_by_time(path, MODE::DAY, 10, false);
|
log.set_cutmode_by_time(path, MODE::DAY, 10, false);
|
||||||
}else if string=="JS"{
|
}else if string=="JS"{
|
||||||
let mut loggerglobel=LOGERGLOBLE.lock().unwrap();
|
let loggerglobel=LOGERGLOBLE.lock().unwrap();
|
||||||
let mut log=loggerglobel.logger_js.lock().unwrap();
|
let mut log=loggerglobel.logger_js.lock().unwrap();
|
||||||
log.set_cutmode_by_time(path, MODE::DAY, 10, false);
|
log.set_cutmode_by_time(path, MODE::DAY, 10, false);
|
||||||
}
|
}
|
||||||
@ -44,7 +43,7 @@ pub fn change_log_path(path: &str,string: &str) {
|
|||||||
pub fn initlog() {
|
pub fn initlog() {
|
||||||
|
|
||||||
//let mut logger = LOGERGloble.lock().unwrap().LOGGER_RUST;
|
//let mut logger = LOGERGloble.lock().unwrap().LOGGER_RUST;
|
||||||
let mut loggerglobel = LOGERGLOBLE.lock().unwrap();
|
let loggerglobel = LOGERGLOBLE.lock().unwrap();
|
||||||
let mut log=loggerglobel.logger_rust.lock().unwrap();
|
let mut log=loggerglobel.logger_rust.lock().unwrap();
|
||||||
log.set_console(true).set_format(Format::Date|Format::Time).set_formatter("{time} {file}{level}:{message}\n")
|
log.set_console(true).set_format(Format::Date|Format::Time).set_formatter("{time} {file}{level}:{message}\n")
|
||||||
.set_cutmode_by_time("rust_log.log",MODE::DAY, 10, false);
|
.set_cutmode_by_time("rust_log.log",MODE::DAY, 10, false);
|
||||||
@ -59,7 +58,7 @@ pub fn initlog() {
|
|||||||
pub fn logtorust<T>(str:T)
|
pub fn logtorust<T>(str:T)
|
||||||
where T: std::fmt::Display
|
where T: std::fmt::Display
|
||||||
{
|
{
|
||||||
let mut loggerglobe=LOGERGLOBLE.lock().unwrap();
|
let loggerglobe=LOGERGLOBLE.lock().unwrap();
|
||||||
let mut log=Arc::clone(&loggerglobe.logger_rust);
|
let mut log=Arc::clone(&loggerglobe.logger_rust);
|
||||||
|
|
||||||
let log1 = log.borrow_mut();
|
let log1 = log.borrow_mut();
|
||||||
@ -69,7 +68,7 @@ where T: std::fmt::Display
|
|||||||
pub fn logtojs<T>(str:T)
|
pub fn logtojs<T>(str:T)
|
||||||
where T: std::fmt::Display
|
where T: std::fmt::Display
|
||||||
{
|
{
|
||||||
let mut loggerglobe=LOGERGLOBLE.lock().unwrap();
|
let loggerglobe=LOGERGLOBLE.lock().unwrap();
|
||||||
let mut log=Arc::clone(&loggerglobe.logger_js);
|
let mut log=Arc::clone(&loggerglobe.logger_js);
|
||||||
|
|
||||||
let log1 = log.borrow_mut();
|
let log1 = log.borrow_mut();
|
||||||
|
@ -131,7 +131,7 @@ pub fn clearserilport() -> String{
|
|||||||
match &mut port_info.port {
|
match &mut port_info.port {
|
||||||
Some(p) => {
|
Some(p) => {
|
||||||
p.set_timeout(Duration::from_millis(100)).unwrap();
|
p.set_timeout(Duration::from_millis(100)).unwrap();
|
||||||
while true{
|
loop{
|
||||||
let sizeread =match p.read(&mut buf){
|
let sizeread =match p.read(&mut buf){
|
||||||
Ok(size)=>{size},
|
Ok(size)=>{size},
|
||||||
Err(_e)=>{return "Port is not open".to_string()}
|
Err(_e)=>{return "Port is not open".to_string()}
|
||||||
|
@ -58,13 +58,7 @@ export default {
|
|||||||
866.794,
|
866.794,
|
||||||
912.297,
|
912.297,
|
||||||
922.450
|
922.450
|
||||||
|
],
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
],
|
|
||||||
shutter_time_up: 1,
|
shutter_time_up: 1,
|
||||||
shutter_time_down: 1,
|
shutter_time_down: 1,
|
||||||
sensor_gain_up: 0,
|
sensor_gain_up: 0,
|
||||||
@ -279,7 +273,17 @@ export default {
|
|||||||
let coeffweave2 = this.Devinfo.bochangxishu.a1;
|
let coeffweave2 = this.Devinfo.bochangxishu.a1;
|
||||||
let coeffweave3 = this.Devinfo.bochangxishu.a2;
|
let coeffweave3 = this.Devinfo.bochangxishu.a2;
|
||||||
let coeffweave4 = this.Devinfo.bochangxishu.a3;
|
let coeffweave4 = this.Devinfo.bochangxishu.a3;
|
||||||
this.Peaks = [];
|
|
||||||
|
var lenthofpeaks=this.Peaks.length;
|
||||||
|
for (var i=lenthofpeaks-1;i>=0;i--){
|
||||||
|
if (this.Peaks[i][3] == false){
|
||||||
|
this.Peaks.splice(i,1);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//this.Peaks = [];
|
||||||
|
|
||||||
let peakformatch = [];
|
let peakformatch = [];
|
||||||
peaks.forEach(element => {
|
peaks.forEach(element => {
|
||||||
var weave = coeffweave1 * element[0] * element[0] * element[0] + coeffweave2 * element[0] * element[0] + coeffweave3 * element[0] + coeffweave4;
|
var weave = coeffweave1 * element[0] * element[0] * element[0] + coeffweave2 * element[0] * element[0] + coeffweave3 * element[0] + coeffweave4;
|
||||||
@ -334,7 +338,14 @@ export default {
|
|||||||
let coeffweave2 = this.Devinfo.bochangxishu2.a1;
|
let coeffweave2 = this.Devinfo.bochangxishu2.a1;
|
||||||
let coeffweave3 = this.Devinfo.bochangxishu2.a2;
|
let coeffweave3 = this.Devinfo.bochangxishu2.a2;
|
||||||
let coeffweave4 = this.Devinfo.bochangxishu2.a3;
|
let coeffweave4 = this.Devinfo.bochangxishu2.a3;
|
||||||
this.PeaksDown = [];
|
var lenthofpeaks=this.PeaksDown.length;
|
||||||
|
for (var i=lenthofpeaks-1;i>=0;i--){
|
||||||
|
if (this.PeaksDown[i][3] == false){
|
||||||
|
this.PeaksDown.splice(i,1);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// this.PeaksDown = [];
|
||||||
peaks.forEach(element => {
|
peaks.forEach(element => {
|
||||||
var weave = coeffweave1 * element[0] * element[0] * element[0] + coeffweave2 * element[0] * element[0] + coeffweave3 * element[0] + coeffweave4;
|
var weave = coeffweave1 * element[0] * element[0] * element[0] + coeffweave2 * element[0] * element[0] + coeffweave3 * element[0] + coeffweave4;
|
||||||
peaksforshow.push([weave, element[1], element[0]]);
|
peaksforshow.push([weave, element[1], element[0]]);
|
||||||
@ -375,6 +386,19 @@ export default {
|
|||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
|
async ClearArry(specindex){
|
||||||
|
if (specindex == 0) {
|
||||||
|
this.Peaks = [];
|
||||||
|
this.option.series[1].data = [];
|
||||||
|
|
||||||
|
} else if (specindex == 1) {
|
||||||
|
this.PeaksDown = [];
|
||||||
|
this.optiondown.series[1].data = [];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
ReplotWeaveInfo(spectralnumber) {
|
ReplotWeaveInfo(spectralnumber) {
|
||||||
let orgoption = {};
|
let orgoption = {};
|
||||||
let Peaksnow = [];
|
let Peaksnow = [];
|
||||||
@ -746,6 +770,8 @@ export default {
|
|||||||
sensor_gain_up.toFixed(2) }} </a-tag>
|
sensor_gain_up.toFixed(2) }} </a-tag>
|
||||||
<b-button @click="CompuWeaveLenth(0)"
|
<b-button @click="CompuWeaveLenth(0)"
|
||||||
style="position:absolute;right: 20%;margin-top:15%; z-index: 10; ;width: 60px ">计算</b-button>
|
style="position:absolute;right: 20%;margin-top:15%; z-index: 10; ;width: 60px ">计算</b-button>
|
||||||
|
<b-button @click="ClearArry(0)"
|
||||||
|
style="position:absolute;right: 20%;margin-top:20%; z-index: 10; ;width: 60px ">清空</b-button>
|
||||||
<div class="chart-container" ref="chart_weavelenth"></div>
|
<div class="chart-container" ref="chart_weavelenth"></div>
|
||||||
|
|
||||||
|
|
||||||
@ -795,6 +821,8 @@ export default {
|
|||||||
shutter_time_down.toFixed(2) }} ms</a-tag>
|
shutter_time_down.toFixed(2) }} ms</a-tag>
|
||||||
<b-button @click="CompuWeaveLenth(1)"
|
<b-button @click="CompuWeaveLenth(1)"
|
||||||
style="position:absolute;right: 20%;margin-top:15%; z-index: 10; ;width: 60px ">计算</b-button>
|
style="position:absolute;right: 20%;margin-top:15%; z-index: 10; ;width: 60px ">计算</b-button>
|
||||||
|
<b-button @click="ClearArry(1)"
|
||||||
|
style="position:absolute;right: 20%;margin-top:20%; z-index: 10; ;width: 60px ">清空</b-button>
|
||||||
<!-- <b-button @click="findpeak(1)" style="position:absolute;right: 20%;margin-top:20%; z-index: 10; ;width: 60px ">寻峰</b-button> -->
|
<!-- <b-button @click="findpeak(1)" style="position:absolute;right: 20%;margin-top:20%; z-index: 10; ;width: 60px ">寻峰</b-button> -->
|
||||||
<div class="chart-container" ref="chart_weavelenth_down"></div>
|
<div class="chart-container" ref="chart_weavelenth_down"></div>
|
||||||
<div style="width: 20%; overflow: auto;height:80%;">
|
<div style="width: 20%; overflow: auto;height:80%;">
|
||||||
|
Reference in New Issue
Block a user