1.阻抗显示 2.解码器启动配置文件更改
This commit is contained in:
@@ -223,7 +223,8 @@ Item {
|
||||
id: connectTimer
|
||||
interval: 3*1000;
|
||||
onTriggered: {
|
||||
clientSocket.connected();
|
||||
clientSocket.disconnectFromHost();
|
||||
clientSocket.connectToHost();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -241,19 +242,19 @@ Item {
|
||||
{
|
||||
stimulateTimer.stop()
|
||||
}
|
||||
if(index === "2")
|
||||
if(index === "0")
|
||||
{
|
||||
ssvepTenHzTimer.start();
|
||||
hitTimer.start();
|
||||
bci.startTrain(0,responseTime-2);
|
||||
hitIndex = 0;
|
||||
}else if(index === "0")
|
||||
}else if(index === "1")
|
||||
{
|
||||
ssvepTwelveHzTimer.start();
|
||||
hitTimer.start();
|
||||
bci.startTrain(1,responseTime-2);
|
||||
hitIndex = 1;
|
||||
}else if(index === "1")
|
||||
}else if(index === "2")
|
||||
{
|
||||
ssvepFifteenHzTimer.start();
|
||||
hitTimer.start();
|
||||
@@ -298,6 +299,13 @@ Item {
|
||||
{
|
||||
bci.initTrain();
|
||||
clientSocket.connectToHost();
|
||||
|
||||
var channels = bci.getChannels();
|
||||
for(var i=0;i<channels.length;i++)
|
||||
{
|
||||
console.log("12344",channels[i])
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -314,19 +322,23 @@ Item {
|
||||
//判断是不是阻抗数据
|
||||
var parts = cmd.split(":");
|
||||
//通道序列号
|
||||
var channels = [0,1,2,3,4,5,6,7]
|
||||
var channels = bci.getChannels();
|
||||
for(var i=0;i<channels.length;i++)
|
||||
{
|
||||
console.info(channels[i],parts[channels[i]],popimpedance.minImpedance,popimpedance.maxImpedance);
|
||||
if(channels[i] < parts.length)
|
||||
{
|
||||
if(Number(parts[channels[i]]) < popimpedance.minImpedance)
|
||||
{
|
||||
console.info("green");
|
||||
popimpedance.colorChange(i,green)
|
||||
}else if(Number(parts[channels[i]]) > popimpedance.maxImpedance)
|
||||
{
|
||||
console.info("red");
|
||||
popimpedance.colorChange(i,red)
|
||||
}else
|
||||
{
|
||||
console.info("yellow");
|
||||
popimpedance.colorChange(i,yellow)
|
||||
}
|
||||
}
|
||||
@@ -339,7 +351,7 @@ Item {
|
||||
}
|
||||
onConnected:
|
||||
{
|
||||
console.info("Client socket connected");
|
||||
console.info("Client socket connected 111111");
|
||||
bConnect = true;
|
||||
bci.deviceStatus(true);
|
||||
if(connectTimer.running)
|
||||
@@ -1033,6 +1045,14 @@ Item {
|
||||
anchors.fill: parent
|
||||
onClicked: {
|
||||
popimpedance.show()
|
||||
popimpedance.colorChange(0,green)
|
||||
popimpedance.colorChange(1,green)
|
||||
popimpedance.colorChange(2,green)
|
||||
popimpedance.colorChange(3,green)
|
||||
popimpedance.colorChange(4,green)
|
||||
popimpedance.colorChange(5,green)
|
||||
popimpedance.colorChange(6,green)
|
||||
popimpedance.colorChange(7,green)
|
||||
popimpedance.colorChange(9,green)
|
||||
popimpedance.colorChange(10,green)
|
||||
}
|
||||
@@ -1041,8 +1061,8 @@ Item {
|
||||
}
|
||||
PopImpedance{
|
||||
id:popimpedance
|
||||
property int maxImpedance: 6
|
||||
property int minImpedance: 3
|
||||
property int maxImpedance: 15*100
|
||||
property int minImpedance: 10*100
|
||||
Timer {
|
||||
id: impedanceTimer
|
||||
interval: 1000
|
||||
@@ -1055,10 +1075,14 @@ Item {
|
||||
{
|
||||
if(visible)
|
||||
{
|
||||
impedanceTimer.start();
|
||||
//impedanceTimer.start();
|
||||
//开启阻抗
|
||||
clientSocket.writeBytes(getIntArr("3"));
|
||||
}else
|
||||
{
|
||||
impedanceTimer.stop();
|
||||
//impedanceTimer.stop();
|
||||
//关闭阻抗
|
||||
clientSocket.writeBytes(getIntArr("4"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user