adfasdfa
This commit is contained in:
Binary file not shown.
@ -35,3 +35,41 @@
|
||||
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
|
||||
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
|
||||
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
|
||||
357 811 7659654745261843 iris_is3lib.dll 5b4e6d9afd7a8d3b
|
||||
357 811 7659654745261843 iris_is3lib.lib 5b4e6d9afd7a8d3b
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -32,3 +32,16 @@
|
||||
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
|
||||
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
|
||||
617 1030 7669134111816719 iris_is3lib.dll c7564dfa3e9c17a2
|
||||
617 1030 7669134111816719 iris_is3lib.lib c7564dfa3e9c17a2
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -63,7 +63,7 @@ int main() {
|
||||
for (int i = 0; i < portNameList.size(); ++i) {
|
||||
printf("portName:%s\n",portNameList[i].portName);
|
||||
}
|
||||
std::string portname="COM20";
|
||||
std::string portname="COM24";
|
||||
serialport->init(portname.c_str(),BaudRate921600 ,ParityNone,DataBits8,StopOne,FlowNone,512*512);
|
||||
serialport->setOperateMode(SynchronousOperate);
|
||||
//serialport->setReadIntervalTimeout(10000);
|
||||
@ -82,6 +82,15 @@ int main() {
|
||||
IS3Set_Serial_FUN(SerialWrite,SerailRead);
|
||||
IS3SensorInit();
|
||||
uint16_t *buffforread=new uint16_t[1000];
|
||||
// while (1) {
|
||||
// IS3SetShutterOpen(0);
|
||||
// IS3GetData(buffforread,1000);
|
||||
// IS3SetShutterOpen(1);
|
||||
// }
|
||||
|
||||
|
||||
|
||||
|
||||
STRsensorinfo_C info= IS3Get_SensorInfo();
|
||||
//输出info
|
||||
printf("--------------------------------------\nSensorName:%s\n",info.SensorName);
|
||||
@ -103,7 +112,7 @@ int main() {
|
||||
printf("a3:%f\n",info.a3);
|
||||
printf("a4:%f\n",info.a4 );
|
||||
|
||||
// IS3OptSnenser(80);
|
||||
IS3OptSnenser(80);
|
||||
while (1) {
|
||||
IS3GetData(buffforread,200);
|
||||
}
|
||||
|
@ -96,11 +96,11 @@ size_t SendGetData(int shutter)
|
||||
SerialWrite(BufferFortempWrite, lenthforwrite);
|
||||
for (int i=0;i<10;i++)
|
||||
{
|
||||
size_t retunnumber = GetInfoBackFromSensorinTime(GET_DATA_FROM_SENSOR,shutter+2000);
|
||||
if (retunnumber!=OVERTIME ) {
|
||||
size_t retunnumber = GetInfoBackFromSensorinTime(GET_DATA_FROM_SENSOR,2*shutter+2000);
|
||||
if (retunnumber<OVERTIME) {
|
||||
return retunnumber;
|
||||
}
|
||||
if (i%2==0) {
|
||||
if (i%5==0) {
|
||||
printf("send command again\n");
|
||||
SerialWrite(BufferFortempWrite, lenthforwrite);
|
||||
|
||||
@ -196,7 +196,7 @@ size_t GetInfoBackFromSensor(uint8_t Command) // big
|
||||
|
||||
size_t GetInfoBackFromSensorinTime(uint8_t Command,uint32_t waittime) // big <20><>ָ<EFBFBD>ü<EFBFBD><C3BC><EFBFBD><EFBFBD>ֽڱ<D6BD>ʾ<EFBFBD><CABE><EFBFBD>ݳ<EFBFBD><DDB3><EFBFBD> <20><>ʱֻ<CAB1><D6BB><EFBFBD>ֲɼ<D6B2><C9BC><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֽ<EFBFBD>
|
||||
{
|
||||
delay(1);
|
||||
delay(1);
|
||||
//<2F><>ȡ<EFBFBD><C8A1>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>
|
||||
size_t begintime= get_system_uptime_ms();
|
||||
|
||||
@ -227,6 +227,11 @@ size_t GetInfoBackFromSensorinTime(uint8_t Command,uint32_t waittime) // big
|
||||
// delay(1000);
|
||||
// }
|
||||
}
|
||||
if (BufferForRead[2]==0x40) {
|
||||
printf("warning: sensor busy\n");
|
||||
return SENSORBUSY;
|
||||
|
||||
}
|
||||
int lenth = BufferForRead[3] * 256 + BufferForRead[4];
|
||||
while (TotalIndexNow < lenth + 7)
|
||||
{
|
||||
|
@ -19,6 +19,7 @@
|
||||
#define COMMAND_MULTSET 0x10
|
||||
#define POLYNOMIAL 0xa001 //modbus crc
|
||||
#define OVERTIME 1000000000
|
||||
#define SENSORBUSY 1000000000
|
||||
#include "comon.h"
|
||||
|
||||
|
||||
|
@ -71,4 +71,10 @@ int IS3GetData(uint16_t *outdata, int shuttertime) {
|
||||
// printf("a[0]=%f\n",a[0]);
|
||||
thissensorIS3->SetWeaveLenthCoeff(a,lenth);
|
||||
return 1;
|
||||
}
|
||||
|
||||
void IS3SetShutterOpen(int isopen) {
|
||||
thissensorIS3->SetShutter(isopen);
|
||||
// printf("IS3SetShutterOpen\n");
|
||||
// printf("isopen=%d\n",isopen);
|
||||
}
|
@ -26,7 +26,7 @@ __declspec(dllexport) STRsensorinfo_C IS3Get_SensorInfo();
|
||||
__declspec(dllexport) int IS3OptSnenser(int percent);
|
||||
__declspec(dllexport) int IS3GetData(uint16_t *outdata,int shuttertime);
|
||||
__declspec(dllexport) int IS3SetWeaveLenthCoeff(double *a,int lenth);
|
||||
|
||||
__declspec(dllexport) void IS3SetShutterOpen(int isopen);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -145,6 +145,23 @@ void SensorIS3::SetShutter(int id)
|
||||
break;
|
||||
}
|
||||
}
|
||||
#else
|
||||
switch (id) {
|
||||
|
||||
case 0: {
|
||||
u_char a=1;
|
||||
SendSettingCommand(SET_SHUTTER_CLOSE,1, &a, 1);
|
||||
break;
|
||||
}
|
||||
case 1: {
|
||||
u_char a=1;
|
||||
//SendSettingCommand(SET_SHUTTER_CLOSE,1, &a, 1);
|
||||
SendSettingCommand(SET_SHUTTER_OPEN,1, &a, 1);
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -188,6 +205,7 @@ void SensorIS3::GetOneDate(int msc)
|
||||
}
|
||||
shutternow=msc;
|
||||
size_t retsize= SendGetData(shutternow);
|
||||
|
||||
memcpy(DATABUFF,DataRetrun,515*2);
|
||||
//shortLittletoBiG(DATABUFF, SensorInfo.BandNum*2);
|
||||
|
||||
@ -198,7 +216,7 @@ void SensorIS3::GetOneDate(int msc)
|
||||
|
||||
int SensorIS3::OptSnenser(int persent)
|
||||
{
|
||||
|
||||
long minshuttertime=12;
|
||||
long maxtime = 10000;
|
||||
int maxvalue=SensorInfo.maxValue*1.0*persent / 100;
|
||||
int maxvaluenow = 0;
|
||||
@ -208,6 +226,7 @@ int SensorIS3::OptSnenser(int persent)
|
||||
|
||||
int numberoftry = 0;
|
||||
while (maxvaluenow<maxvalue*0.95 || maxvaluenow>maxvalue) {
|
||||
|
||||
if (maxvaluenow > maxvalue)
|
||||
{
|
||||
shutternow = shutternow *0.7;
|
||||
@ -225,6 +244,11 @@ int SensorIS3::OptSnenser(int persent)
|
||||
shutternow = maxtime;
|
||||
break;
|
||||
}
|
||||
if (shutternow < minshuttertime)
|
||||
{
|
||||
shutternow = minshuttertime;
|
||||
break;
|
||||
}
|
||||
GetOneDate(shutternow);
|
||||
maxvaluenow= Getmaxvalue(DATABUFF, SensorInfo.BandNum);
|
||||
#ifdef ARDUINO
|
||||
|
Submodule myis11/src/thirdpart/iris_proto_tool updated: 164ba745a3...ede12920c7
1165
package-lock.json
generated
1165
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -21,6 +21,7 @@
|
||||
"element-plus": "^2.4.4",
|
||||
"json-editor-vue3": "^1.1.1",
|
||||
"less": "^4.2.0",
|
||||
"markdown-it": "^14.1.0",
|
||||
"mitt": "^3.0.1",
|
||||
"serialport": "^12.0.0",
|
||||
"vue": "^3.3.4",
|
||||
@ -34,6 +35,6 @@
|
||||
"@tauri-apps/cli": "^1.5.11",
|
||||
"@vitejs/plugin-vue": "^5.0.4",
|
||||
"unplugin-vue-components": "^0.27.0",
|
||||
"vite": "^5.0.0"
|
||||
"vite": "^6.2.3"
|
||||
}
|
||||
}
|
||||
|
38
src-tauri/Cargo.lock
generated
38
src-tauri/Cargo.lock
generated
@ -491,7 +491,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "13b588ba4ac1a99f7f2964d24b3d896ddc6bf847ee3855dbd4366f058cfcd331"
|
||||
dependencies = [
|
||||
"quote",
|
||||
"syn 2.0.64",
|
||||
"syn 2.0.100",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -522,7 +522,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "edb49164822f3ee45b17acd4a208cfc1251410cf0cad9a833234c9890774dd9f"
|
||||
dependencies = [
|
||||
"quote",
|
||||
"syn 2.0.64",
|
||||
"syn 2.0.100",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -570,7 +570,7 @@ dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"strsim 0.11.1",
|
||||
"syn 2.0.64",
|
||||
"syn 2.0.100",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -592,7 +592,7 @@ checksum = "733cabb43482b1a1b53eee8583c2b9e8684d592215ea83efd305dd31bc2f0178"
|
||||
dependencies = [
|
||||
"darling_core 0.20.9",
|
||||
"quote",
|
||||
"syn 2.0.64",
|
||||
"syn 2.0.100",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -860,7 +860,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.64",
|
||||
"syn 2.0.100",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -1774,7 +1774,7 @@ checksum = "254a5372af8fc138e36684761d3c0cdb758a4410e938babcff1c860ce14ddbfc"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.64",
|
||||
"syn 2.0.100",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -2212,7 +2212,7 @@ dependencies = [
|
||||
"phf_shared 0.11.2",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.64",
|
||||
"syn 2.0.100",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -2356,9 +2356,9 @@ checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068"
|
||||
|
||||
[[package]]
|
||||
name = "proc-macro2"
|
||||
version = "1.0.82"
|
||||
version = "1.0.95"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8ad3d49ab951a01fbaafe34f2ec74122942fe18a3f9814c3268f1bb72042131b"
|
||||
checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778"
|
||||
dependencies = [
|
||||
"unicode-ident",
|
||||
]
|
||||
@ -2698,7 +2698,7 @@ checksum = "6048858004bcff69094cd972ed40a32500f153bd3be9f716b2eed2e8217c4838"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.64",
|
||||
"syn 2.0.100",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -2721,7 +2721,7 @@ checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.64",
|
||||
"syn 2.0.100",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -2782,7 +2782,7 @@ dependencies = [
|
||||
"darling 0.20.9",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.64",
|
||||
"syn 2.0.100",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -3041,9 +3041,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
version = "2.0.64"
|
||||
version = "2.0.100"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7ad3dee41f36859875573074334c200d1add8e4a87bb37113ebd31d926b7b11f"
|
||||
checksum = "b09a44accad81e1ba1cd74a32461ba89dee89095ba17b32f5d03683b1b1fc2a0"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
@ -3386,7 +3386,7 @@ checksum = "e2470041c06ec3ac1ab38d0356a6119054dedaea53e12fbefc0de730a1c08524"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.64",
|
||||
"syn 2.0.100",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -3487,7 +3487,7 @@ checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.64",
|
||||
"syn 2.0.100",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -3577,7 +3577,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.64",
|
||||
"syn 2.0.100",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -3775,7 +3775,7 @@ dependencies = [
|
||||
"once_cell",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.64",
|
||||
"syn 2.0.100",
|
||||
"wasm-bindgen-shared",
|
||||
]
|
||||
|
||||
@ -3809,7 +3809,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.64",
|
||||
"syn 2.0.100",
|
||||
"wasm-bindgen-backend",
|
||||
"wasm-bindgen-shared",
|
||||
]
|
||||
|
@ -34,6 +34,7 @@ nalgebra = "0.33.2"
|
||||
|
||||
|
||||
|
||||
|
||||
[features]
|
||||
# This feature is used for production builds or when a dev server is not specified, DO NOT REMOVE!!
|
||||
custom-protocol = ["tauri/custom-protocol"]
|
||||
|
@ -1 +1 @@
|
||||
{"pathofsave":"C:\\Users\\xin\\Desktop\\test\\123","Filename":"testaa","caijiavgNumber":"1","useSG":false,"usehighpass":false,"Dispatcher":{"isenable":true,"begin":"06:25","end":"23:59"},"sensor_typeforset":"IS3"}
|
||||
{"pathofsave":null,"Filename":"testaa","caijiavgNumber":"1","useSG":false,"usehighpass":false,"Dispatcher":{"isenable":true,"begin":"06:25","end":"23:59"},"sensor_typeforset":"IS3"}
|
Binary file not shown.
Binary file not shown.
@ -1,6 +1,5 @@
|
||||
extern crate savgol_rs;
|
||||
|
||||
|
||||
use savgol_rs::savgol_filter;
|
||||
pub fn savgol(data: Vec<f64>, window: usize, order: usize) -> Vec<f64> {
|
||||
let svinput= savgol_rs::SavGolInput{data:&data,window_length:window,poly_order:order,derivative:0};
|
||||
@ -20,4 +19,4 @@ fn test_savgol() {
|
||||
let smoothed_data = savgol(data.clone(), window, order);
|
||||
println!("Smoothed data: {:?}", smoothed_data);
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -62,6 +62,7 @@ pub fn sendtoport_andgetreturn(
|
||||
"sensor_type":"IRIS-Sensor",
|
||||
"fiber_type":"Single",
|
||||
"shutter_time":shuttertime,
|
||||
"has_shutter":true,
|
||||
|
||||
|
||||
});
|
||||
|
@ -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();
|
||||
|
@ -230,4 +230,26 @@ pub fn set_sensor_weave_length_coeff(a: Vec<f64>) -> i32 {
|
||||
return 0;
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
pub fn sensor_set_shutter_open(isopen:i32) {
|
||||
let senortype = SENSORTYPE.lock().unwrap();
|
||||
match *senortype {
|
||||
Senortype::IS11 => {
|
||||
unsafe {
|
||||
|
||||
}
|
||||
|
||||
},
|
||||
Senortype::IS3 => {
|
||||
unsafe {
|
||||
IS3_sensor::IS3SetShutterOpen(isopen);
|
||||
|
||||
}
|
||||
|
||||
},
|
||||
_ => {
|
||||
|
||||
},
|
||||
}
|
||||
}
|
@ -11,6 +11,7 @@ use std::fs::File;
|
||||
use std::mem;
|
||||
use std::path::Path;
|
||||
use std::io::Read;
|
||||
use super::super::algorithm::*;
|
||||
#[derive(PartialEq)]
|
||||
enum WorkStat {
|
||||
IDLE,
|
||||
@ -54,8 +55,8 @@ lazy_static! {
|
||||
removedark: false,
|
||||
computeflat: true,
|
||||
average_number_data: 1,
|
||||
average_number_dark: 1,
|
||||
average_number_flat: 1,
|
||||
average_number_dark: 10,
|
||||
average_number_flat: 10,
|
||||
has_CalidataUP: false,
|
||||
|
||||
}));
|
||||
@ -260,7 +261,9 @@ pub fn collcect_dark(shuttertime:u32)
|
||||
drop(dev_stat); //释放锁
|
||||
thread::spawn(move || {
|
||||
let mut datasum:Vec<u32>=vec![0;bandsunm];
|
||||
sensor_set_shutter_open(0);
|
||||
for _i in 0..averagenumber {
|
||||
|
||||
let data=super::spectralbase::sensor_get_data(shuttertime as i32);
|
||||
for i in 0..bandsunm {
|
||||
datasum[i]=datasum[i]+data[i] as u32;
|
||||
@ -271,6 +274,7 @@ pub fn collcect_dark(shuttertime:u32)
|
||||
dev_stat.percent=((_i+1) as f32/averagenumber as f32*100 as f32*0.9) as i32;
|
||||
drop(dev_stat); //释放锁
|
||||
}
|
||||
sensor_set_shutter_open(1);
|
||||
let data=datasum.iter().map(|x| *x as f32/averagenumber as f32).collect::<Vec<f32>>();
|
||||
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
"package": {
|
||||
"productName": "SpectralPlot",
|
||||
"version": "0.6.59"
|
||||
"version": "0.6.62"
|
||||
},
|
||||
"tauri": {
|
||||
|
||||
|
@ -8,6 +8,7 @@ import SetName from "./components/menubox/SetName.vue";
|
||||
import SetWorkmode from "./components/menubox/SetWorkmode.vue";
|
||||
import setCalibrate from "./components/menubox/SetCalibrate.vue";
|
||||
import setWavelenthCoeff from "./components/menubox/SetWavelenthcoeff.vue";
|
||||
import Help from "./components/menubox/help.vue";
|
||||
import Greet from "./components/Greet.vue";
|
||||
import EventBus from "./eventBus.js";
|
||||
import {$ref} from "vue3-json-editor/dist/vue3-json-editor.cjs.js";
|
||||
@ -32,6 +33,14 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
if (command.type=="info"){
|
||||
if (command.name=="help"){
|
||||
this.modaltitle="关于";
|
||||
this.modalcomponent=Help;
|
||||
this.showModal();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -34,8 +34,10 @@ async function Set_Gain(gain)
|
||||
//todo 增益设置
|
||||
}
|
||||
|
||||
async function Get_Data_from_dev(Datatype) {
|
||||
|
||||
|
||||
|
||||
async function Get_Data_from_dev(Datatype,shuttertimes,avgnumber=1) {
|
||||
|
||||
let drection=Datatype;
|
||||
//获取数据 UPDN
|
||||
let data = {
|
||||
|
@ -81,14 +81,21 @@ export default {
|
||||
}
|
||||
if (Command=="DC")
|
||||
{
|
||||
|
||||
|
||||
let r= await confirm(' 请扣上遮光罩--》再点击确定');
|
||||
let r=true
|
||||
let has_shutter=false;
|
||||
if (typeof(this.Devinfo.has_shutter)!="undefined")
|
||||
{
|
||||
has_shutter=this.Devinfo.has_shutter;
|
||||
}
|
||||
|
||||
if (!has_shutter)
|
||||
{r= await confirm(' 请扣上遮光罩--》再点击确定');}
|
||||
|
||||
if (r)
|
||||
{
|
||||
this.iscollecting=true;
|
||||
|
||||
let datatoshow=await SerialportMethod.Get_Dark_Data("UP",this.ShutterTime[0],this.caijiavgNumber);
|
||||
let datatoshow=await SerialportMethod.Get_Dark_Data("UP",this.ShutterTime[0],10);
|
||||
this.iscollecting=false;
|
||||
// this.showdataasup(datatoshow);
|
||||
this.GetoneData();
|
||||
|
@ -126,17 +126,11 @@ export default {
|
||||
<BDropdownDivider></BDropdownDivider>
|
||||
<BDropdownItem href="#">退出</BDropdownItem>
|
||||
<BDropdownItem href="#" @click="onmenuclick('File','Advance')">高级</BDropdownItem>
|
||||
|
||||
<BDropdownItem @click="onmenuclick('info','help')">帮助</BDropdownItem>
|
||||
</BNavItemDropdown>
|
||||
|
||||
<!-- <!– Navbar dropdowns –>-->
|
||||
<BNavItemDropdown text="窗口" right>
|
||||
|
||||
<!-- <BDropdownItem @click="showbox">EN</BDropdownItem>-->
|
||||
<!-- <BDropdownItem >ES</BDropdownItem>-->
|
||||
<!-- <BDropdownItem href="#">RU</BDropdownItem>-->
|
||||
<!-- <BDropdownItem href="#">FA</BDropdownItem>-->
|
||||
</BNavItemDropdown>
|
||||
|
||||
<BNavItemDropdown text="设置" right>
|
||||
<BDropdownItem @click="onmenuclick('Set','Workmode')">工作模式</BDropdownItem>
|
||||
@ -146,7 +140,14 @@ export default {
|
||||
<BDropdownItem @click="onmenuclick('Set','Calibrate')">定标</BDropdownItem>
|
||||
</BNavItemDropdown>
|
||||
|
||||
<BNavItemDropdown text="窗口" right>
|
||||
|
||||
|
||||
<!-- <BDropdownItem @click="showbox">EN</BDropdownItem>-->
|
||||
<!-- <BDropdownItem >ES</BDropdownItem>-->
|
||||
<!-- <BDropdownItem href="#">RU</BDropdownItem>-->
|
||||
<!-- <BDropdownItem href="#">FA</BDropdownItem>-->
|
||||
</BNavItemDropdown>
|
||||
|
||||
|
||||
|
||||
|
@ -221,10 +221,12 @@ export default {
|
||||
|
||||
this.shutter_time_up = ret;
|
||||
this.sensor_gain_up = 0;
|
||||
let datatoshow=await SensorMethod.Get_Dark_Data("UP",this.shutter_time_up,10);
|
||||
} else if (dire == 1) {
|
||||
var ret = await SensorMethod.Dev_Opt_Two(70);
|
||||
this.shutter_time_down = ret;
|
||||
this.sensor_gain_down = 0;
|
||||
let datatoshow=await SensorMethod.Get_Dark_Data("UP",this.shutter_time_down,10);
|
||||
}
|
||||
|
||||
|
||||
|
27
src/components/menubox/help.vue
Normal file
27
src/components/menubox/help.vue
Normal file
@ -0,0 +1,27 @@
|
||||
<template>
|
||||
<div class="help">
|
||||
<h1>更新日志</h1>
|
||||
<MarkdownFile></MarkdownFile>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.help {
|
||||
padding: 20px;
|
||||
font-family: Arial, sans-serif;
|
||||
}
|
||||
|
||||
.help h1 {
|
||||
font-size: 24px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.help p {
|
||||
font-size: 16px;
|
||||
}
|
||||
</style>
|
0
src/components/menubox/updatelog.md
Normal file
0
src/components/menubox/updatelog.md
Normal file
@ -258,9 +258,21 @@ export default {
|
||||
var lenthofdataup=dataup.data.length;
|
||||
for (var i=0;i<lenthofdataup;i++)
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if(this.Devinfo.name=="IRIS-IS11")
|
||||
{
|
||||
yValues.push(dataup.data[lenthofdataup-i-1]);
|
||||
yvalues2.push(datadown.data[lenthofdataup-i-1]);
|
||||
}
|
||||
else{
|
||||
yValues.push(dataup.data[i]);
|
||||
yvalues2.push(datadown.data[i]);
|
||||
}
|
||||
}
|
||||
if (this.outputconfig.isChongCaiyang)
|
||||
{
|
||||
let aaa= await invoke("interpolate_spline",{x:xValues,y:yValues,step:this.outputconfig.ChongCaiyanginterval})
|
||||
@ -321,7 +333,13 @@ export default {
|
||||
var lenthofdataup=datatosave.data.length;
|
||||
for (var i=0;i<lenthofdataup;i++)
|
||||
{
|
||||
yValues.push(datatosave.data[lenthofdataup-i-1]);
|
||||
if(this.Devinfo.sensor_type=="IRIS-IS11")
|
||||
{
|
||||
yValues.push(datatosave.data[lenthofdataup-i-1]);
|
||||
}else {
|
||||
yValues.push(datatosave.data[i]);
|
||||
}
|
||||
|
||||
}
|
||||
var yValuesofchongcaiyang = []
|
||||
if (this.outputconfig.isChongCaiyang)
|
||||
|
@ -5,7 +5,9 @@ import {BootstrapVueNextResolver} from 'unplugin-vue-components/resolvers'
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig(async () => ({
|
||||
plugins: [vue(),
|
||||
plugins: [vue({
|
||||
include: [/\.vue$/, /\.md$/], // 允许vue组件处理md文件
|
||||
}),
|
||||
Components({
|
||||
resolvers: [BootstrapVueNextResolver()],
|
||||
}),
|
||||
|
Reference in New Issue
Block a user