Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1c1e8f3784 |
@@ -42,7 +42,7 @@
|
||||
</va-tree-category>
|
||||
|
||||
<va-tree-category
|
||||
v-if="workingModeSelect != null && workingModeSelect.id == 0 || workingModeSelect.id == 1 || workingModeSelect.id == 4 ||workingModeSelect.id == 6 || workingModeSelect.id == 7 || workingModeSelect.id == 8 || workingModeSelect.id == 9 || workingModeSelect.id == 11"
|
||||
v-if="workingModeSelect != null && workingModeSelect.id == 0 || workingModeSelect.id == 1 || workingModeSelect.id == 4 ||workingModeSelect.id == 6 || workingModeSelect.id == 7 || workingModeSelect.id == 8 || workingModeSelect.id == 9 || workingModeSelect.id == 11 || workingModeSelect.id == 13"
|
||||
style="font-size: 20px;"
|
||||
:label="'Range ( ' + voltageInRangeOptions[voltageInRangeSelect].label + ' )'">
|
||||
<va-tree-node>
|
||||
@@ -51,7 +51,7 @@
|
||||
</va-tree-category>
|
||||
|
||||
<va-tree-category
|
||||
v-if="workingModeSelect != null && workingModeSelect.id == 0 || workingModeSelect.id == 1 || workingModeSelect.id == 2 || workingModeSelect.id == 3 || workingModeSelect.id == 4 || workingModeSelect.id == 5 || workingModeSelect.id == 6 || workingModeSelect.id == 7 || workingModeSelect.id == 8 || workingModeSelect.id == 9 || workingModeSelect.id == 10"
|
||||
v-if="workingModeSelect != null && workingModeSelect.id == 0 || workingModeSelect.id == 1 || workingModeSelect.id == 2 || workingModeSelect.id == 3 || workingModeSelect.id == 4 || workingModeSelect.id == 5 || workingModeSelect.id == 6 || workingModeSelect.id == 7 || workingModeSelect.id == 8 || workingModeSelect.id == 9 || workingModeSelect.id == 10 || workingModeSelect.id == 13"
|
||||
style="font-size: 20px;"
|
||||
:label="'HighZ ( ' + highzOptions[highzSelect].label + ' )'">
|
||||
<va-tree-node>
|
||||
@@ -123,7 +123,7 @@
|
||||
</va-tree-category>
|
||||
|
||||
<va-tree-category
|
||||
v-if="workingModeSelect != null && workingModeSelect.id == 2 || workingModeSelect.id == 3 || workingModeSelect.id == 4 || workingModeSelect.id == 5 || workingModeSelect.id == 6"
|
||||
v-if="workingModeSelect != null && workingModeSelect.id == 2 || workingModeSelect.id == 3 || workingModeSelect.id == 4 || workingModeSelect.id == 5 || workingModeSelect.id == 6 || workingModeSelect.id == 13"
|
||||
style="font-size: 20px;"
|
||||
:label="'Sample rate ( ' + sampleRateNumber/10 + 'sps )'">
|
||||
<va-tree-node>
|
||||
@@ -239,6 +239,25 @@
|
||||
</va-tree-node>
|
||||
</va-tree-category>
|
||||
|
||||
<va-tree-category
|
||||
v-if="workingModeSelect != null && workingModeSelect.id == 13"
|
||||
style="font-size: 20px;"
|
||||
:label="'Duration ( ' + duration + timeOptions[timeUnit].label + ' )'">
|
||||
<va-tree-node>
|
||||
<div class="row">
|
||||
<div class="flex sm12 xl12 md12 xs12">
|
||||
<div class="flex row align--center">
|
||||
<va-input
|
||||
class="mb-0"
|
||||
v-model="duration"
|
||||
/>
|
||||
<level-button :ref="'timeUnit'" :deviceID="deviceID" :options="timeOptions" :parameterName="'TIME_UNIT'" @parameterChange="deviceParameterChange($event)" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</va-tree-node>
|
||||
</va-tree-category>
|
||||
|
||||
<va-tree-category
|
||||
v-if="workingModeSelect != null && workingModeSelect.id == 12"
|
||||
style="font-size: 20px;"
|
||||
@@ -339,7 +358,6 @@
|
||||
|
||||
</va-card>
|
||||
</va-tree-category>
|
||||
|
||||
</va-tree-root>
|
||||
</div>
|
||||
</template>
|
||||
@@ -439,6 +457,10 @@ export default {
|
||||
id: 12,
|
||||
description: 'Dev Mode',
|
||||
},
|
||||
{
|
||||
id: 13,
|
||||
description: 'Open Circuit Potential',
|
||||
},
|
||||
],
|
||||
currentRangeSelect: null,
|
||||
currentRangeOptions: [
|
||||
@@ -557,6 +579,26 @@ export default {
|
||||
read: '',
|
||||
notify: '',
|
||||
},
|
||||
duration: 0,
|
||||
timeUnit: null,
|
||||
timeOptions: [
|
||||
{
|
||||
value: 0,
|
||||
label: 'h',
|
||||
},
|
||||
{
|
||||
value: 1,
|
||||
label: 'm',
|
||||
},
|
||||
{
|
||||
value: 2,
|
||||
label: 's',
|
||||
},
|
||||
{
|
||||
value: 3,
|
||||
label: 'ms',
|
||||
},
|
||||
],
|
||||
}
|
||||
},
|
||||
mqtt: {
|
||||
@@ -631,6 +673,11 @@ export default {
|
||||
this.$refs.cycleNoNumber.updateCycleNumber(this.cycleNoNumber)
|
||||
}
|
||||
|
||||
this.timeUnit = taskInfo.getDeviceInfo(this.deviceID).parameterSet.TIME_UNIT
|
||||
if (this.$refs.timeUnit != null) {
|
||||
this.$refs.timeUnit.updateLevelButton(this.timeUnit)
|
||||
}
|
||||
|
||||
this.outputVoltNumber = (taskInfo.getDeviceInfo(this.deviceID).parameterSet.DAC_VOLT - 25000) / 5
|
||||
if (this.$refs.outputVoltNumber != null) {
|
||||
this.$refs.outputVoltNumber.updateVoltNumber(this.outputVoltNumber)
|
||||
@@ -782,6 +829,25 @@ export default {
|
||||
instruction: 'dev_battery',
|
||||
}))
|
||||
},
|
||||
setDuration () {
|
||||
let totalTime = 0 // ms
|
||||
if (this.timeOptions[this.timeUnit].label === 'h') {
|
||||
totalTime = this.duration * 1000 * 60 * 60
|
||||
} else if (this.timeOptions[this.timeUnit].label === 'm') {
|
||||
totalTime = this.duration * 1000 * 60
|
||||
} else if (this.timeOptions[this.timeUnit].label === 's') {
|
||||
totalTime = this.duration * 1000
|
||||
} else if (this.timeOptions[this.timeUnit].label === 'ms') {
|
||||
totalTime = this.duration
|
||||
}
|
||||
setTimeout(() => {
|
||||
this.mqttPub(taskInfo.getTaskInfo().controllerID + '_user', JSON.stringify({
|
||||
header: 'device_instruction/0',
|
||||
device: taskInfo.getRawDeviceID(this.deviceID),
|
||||
instruction: 'interrupt',
|
||||
}))
|
||||
}, totalTime)
|
||||
},
|
||||
},
|
||||
mounted () {
|
||||
this.refresh()
|
||||
|
||||
Reference in New Issue
Block a user