列车设置参数调整&状态展示调整
This commit is contained in:
parent
77982dacd2
commit
e6b0557b1b
@ -1 +1 @@
|
|||||||
Subproject commit 11e81fe6e710fea687f038f64a7199f0ead6a23e
|
Subproject commit 099d39589833465c09f01d83cd31d3f063b43089
|
@ -4,54 +4,100 @@
|
|||||||
seamless
|
seamless
|
||||||
title="列车设置"
|
title="列车设置"
|
||||||
v-model="showTrainParamOperation"
|
v-model="showTrainParamOperation"
|
||||||
:width="900"
|
:width="1000"
|
||||||
:height="722"
|
:height="722"
|
||||||
>
|
>
|
||||||
<q-card style="width: 900px; height: auto">
|
<q-card style="width: 1000px; height: auto">
|
||||||
<q-form ref="myForm" @submit="onCreate" class="q-gutter-md">
|
<q-form ref="myForm" @submit="onCreate" class="q-gutter-md">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-6">
|
<div class="col-6">
|
||||||
<div class="float-text">1端</div>
|
<div class="float-text">1端</div>
|
||||||
<div class="stroke-box">
|
<div class="stroke-box">
|
||||||
<div class="row">
|
<div class="float-text">雷达</div>
|
||||||
<div class="col-6 q-px-sm">
|
<div class="stroke-box">
|
||||||
<q-input
|
<div class="row">
|
||||||
class="q-input-xm"
|
<div class="col-6 q-px-sm">
|
||||||
outlined
|
<q-input
|
||||||
v-model.number="model.trainEndsA.radarCheckSpeedDiff"
|
class="q-input-xm"
|
||||||
label="雷达测速差值(m/s)"
|
outlined
|
||||||
hint=""
|
v-model.number="model.trainEndsA.radarCheckSpeedDiff"
|
||||||
/>
|
clearable
|
||||||
|
@clear="() => (model.trainEndsA.radarCheckSpeedDiff = 0)"
|
||||||
|
label="雷达测速差值(m/s)"
|
||||||
|
hint=""
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="col-6 q-px-sm">
|
||||||
|
<q-input
|
||||||
|
class="q-input-sm"
|
||||||
|
outlined
|
||||||
|
v-model.number="model.trainEndsA.radarCheckTime"
|
||||||
|
clearable
|
||||||
|
@clear="() => (model.trainEndsA.radarCheckTime = 0)"
|
||||||
|
label="雷达检测时间(秒)"
|
||||||
|
hint=""
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="col-6 q-px-sm">
|
||||||
|
<q-checkbox
|
||||||
|
style="font-size: 12px"
|
||||||
|
v-model="model.trainEndsA.radarEnable"
|
||||||
|
label="雷达是否有效"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-6 q-px-sm">
|
</div>
|
||||||
<q-input
|
<div class="float-text">速传</div>
|
||||||
class="q-input-sm"
|
<div class="stroke-box">
|
||||||
outlined
|
<div class="row">
|
||||||
v-model.number="model.trainEndsA.radarCheckTime"
|
<div class="col-6 q-px-sm">
|
||||||
label="雷达检测时间(秒)"
|
<q-checkbox
|
||||||
hint=""
|
style="font-size: 12px"
|
||||||
/>
|
v-model="model.trainEndsA.speedSensorEnableA"
|
||||||
|
label="速传1是否有效"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="col-6 q-px-sm">
|
||||||
|
<q-checkbox
|
||||||
|
style="font-size: 12px"
|
||||||
|
v-model="model.trainEndsA.speedSensorEnableB"
|
||||||
|
label="速传2是否有效"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-4 q-px-sm">
|
</div>
|
||||||
<q-checkbox
|
<div class="float-text">加速度计</div>
|
||||||
style="font-size: 12px"
|
<div class="stroke-box" style="margin-bottom: 10px">
|
||||||
v-model="model.trainEndsA.radarEnable"
|
<div class="row">
|
||||||
label="雷达是否有效"
|
<div class="col-6 q-px-sm">
|
||||||
/>
|
<q-input
|
||||||
</div>
|
class="q-input-sm"
|
||||||
<div class="col-4 q-px-sm">
|
outlined
|
||||||
<q-checkbox
|
v-model.number="model.trainEndsA.accCheckSpeedDiff"
|
||||||
style="font-size: 12px"
|
clearable
|
||||||
v-model="model.trainEndsA.speedSensorEnableA"
|
@clear="() => (model.trainEndsA.accCheckSpeedDiff = 0)"
|
||||||
label="速传1是否有效"
|
label="加速度测速差值(米/秒)"
|
||||||
/>
|
hint=""
|
||||||
</div>
|
/>
|
||||||
<div class="col-4 q-px-sm">
|
</div>
|
||||||
<q-checkbox
|
<div class="col-6 q-px-sm">
|
||||||
style="font-size: 12px"
|
<q-input
|
||||||
v-model="model.trainEndsA.speedSensorEnableB"
|
class="q-input-sm"
|
||||||
label="速传2是否有效"
|
outlined
|
||||||
/>
|
v-model.number="model.trainEndsA.accCheckTime"
|
||||||
|
clearable
|
||||||
|
@clear="() => (model.trainEndsA.accCheckTime = 0)"
|
||||||
|
label="加速度持续时间(秒)"
|
||||||
|
hint=""
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="col-6 q-px-sm">
|
||||||
|
<q-checkbox
|
||||||
|
style="font-size: 12px"
|
||||||
|
v-model="model.trainEndsA.accEnable"
|
||||||
|
label="加速度计是否有效"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -59,45 +105,91 @@
|
|||||||
<div class="col-6">
|
<div class="col-6">
|
||||||
<div class="float-text">2端</div>
|
<div class="float-text">2端</div>
|
||||||
<div class="stroke-box">
|
<div class="stroke-box">
|
||||||
<div class="row">
|
<div class="float-text">雷达</div>
|
||||||
<div class="col-6 q-px-sm">
|
<div class="stroke-box">
|
||||||
<q-input
|
<div class="row">
|
||||||
class="q-input-xm"
|
<div class="col-6 q-px-sm">
|
||||||
outlined
|
<q-input
|
||||||
v-model.number="model.trainEndsB.radarCheckSpeedDiff"
|
class="q-input-xm"
|
||||||
label="雷达测速差值(m/s)"
|
outlined
|
||||||
hint=""
|
v-model.number="model.trainEndsB.radarCheckSpeedDiff"
|
||||||
/>
|
clearable
|
||||||
|
@clear="() => (model.trainEndsB.radarCheckSpeedDiff = 0)"
|
||||||
|
label="雷达测速差值(m/s)"
|
||||||
|
hint=""
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="col-6 q-px-sm">
|
||||||
|
<q-input
|
||||||
|
class="q-input-sm"
|
||||||
|
outlined
|
||||||
|
v-model.number="model.trainEndsB.radarCheckTime"
|
||||||
|
clearable
|
||||||
|
@clear="() => (model.trainEndsB.radarCheckTime = 0)"
|
||||||
|
label="雷达检测时间(秒)"
|
||||||
|
hint=""
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="col-6 q-px-sm">
|
||||||
|
<q-checkbox
|
||||||
|
style="font-size: 12px"
|
||||||
|
v-model="model.trainEndsB.radarEnable"
|
||||||
|
label="雷达是否有效"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-6 q-px-sm">
|
</div>
|
||||||
<q-input
|
<div class="float-text">速传</div>
|
||||||
class="q-input-sm"
|
<div class="stroke-box">
|
||||||
outlined
|
<div class="row">
|
||||||
v-model.number="model.trainEndsB.radarCheckTime"
|
<div class="col-6 q-px-sm">
|
||||||
label="雷达检测时间(秒)"
|
<q-checkbox
|
||||||
hint=""
|
style="font-size: 12px"
|
||||||
/>
|
v-model="model.trainEndsB.speedSensorEnableA"
|
||||||
|
label="速传1是否有效"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="col-6 q-px-sm">
|
||||||
|
<q-checkbox
|
||||||
|
style="font-size: 12px"
|
||||||
|
v-model="model.trainEndsB.speedSensorEnableB"
|
||||||
|
label="速传2是否有效"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-4 q-px-sm">
|
</div>
|
||||||
<q-checkbox
|
<div class="float-text">加速度计</div>
|
||||||
style="font-size: 12px"
|
<div class="stroke-box" style="margin-bottom: 10px">
|
||||||
v-model="model.trainEndsB.radarEnable"
|
<div class="row">
|
||||||
label="雷达是否有效"
|
<div class="col-6 q-px-sm">
|
||||||
/>
|
<q-input
|
||||||
</div>
|
class="q-input-sm"
|
||||||
<div class="col-4 q-px-sm">
|
outlined
|
||||||
<q-checkbox
|
v-model.number="model.trainEndsB.accCheckSpeedDiff"
|
||||||
style="font-size: 12px"
|
clearable
|
||||||
v-model="model.trainEndsB.speedSensorEnableA"
|
@clear="() => (model.trainEndsB.accCheckSpeedDiff = 0)"
|
||||||
label="速传1是否有效"
|
label="加速度测速差值(米/秒)"
|
||||||
/>
|
hint=""
|
||||||
</div>
|
/>
|
||||||
<div class="col-4 q-px-sm">
|
</div>
|
||||||
<q-checkbox
|
<div class="col-6 q-px-sm">
|
||||||
style="font-size: 12px"
|
<q-input
|
||||||
v-model="model.trainEndsB.speedSensorEnableB"
|
class="q-input-sm"
|
||||||
label="速传2是否有效"
|
outlined
|
||||||
/>
|
v-model.number="model.trainEndsB.accCheckTime"
|
||||||
|
clearable
|
||||||
|
@clear="() => (model.trainEndsB.accCheckTime = 0)"
|
||||||
|
label="加速度持续时间(秒)"
|
||||||
|
hint=""
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="col-6 q-px-sm">
|
||||||
|
<q-checkbox
|
||||||
|
style="font-size: 12px"
|
||||||
|
v-model="model.trainEndsB.accEnable"
|
||||||
|
label="加速度计是否有效"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -106,7 +198,7 @@
|
|||||||
<div class="float-text">基本参数</div>
|
<div class="float-text">基本参数</div>
|
||||||
<div class="stroke-box">
|
<div class="stroke-box">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-4 q-px-sm">
|
<div class="col-3 q-px-sm">
|
||||||
<q-input
|
<q-input
|
||||||
outlined
|
outlined
|
||||||
class="q-input--sm"
|
class="q-input--sm"
|
||||||
@ -115,7 +207,7 @@
|
|||||||
hint=""
|
hint=""
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-4 q-px-sm">
|
<div class="col-3 q-px-sm">
|
||||||
<q-input
|
<q-input
|
||||||
outlined
|
outlined
|
||||||
class="q-input--sm"
|
class="q-input--sm"
|
||||||
@ -127,7 +219,7 @@
|
|||||||
hint=""
|
hint=""
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-4 q-px-sm">
|
<div class="col-3 q-px-sm">
|
||||||
<q-input
|
<q-input
|
||||||
outlined
|
outlined
|
||||||
class="q-input--sm"
|
class="q-input--sm"
|
||||||
@ -136,7 +228,7 @@
|
|||||||
hint=""
|
hint=""
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-4 q-px-sm">
|
<div class="col-3 q-px-sm">
|
||||||
<q-input
|
<q-input
|
||||||
outlined
|
outlined
|
||||||
v-model.number="model.configData.davisParamB"
|
v-model.number="model.configData.davisParamB"
|
||||||
@ -144,7 +236,7 @@
|
|||||||
hint=""
|
hint=""
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-4 q-px-sm">
|
<div class="col-3 q-px-sm">
|
||||||
<q-input
|
<q-input
|
||||||
outlined
|
outlined
|
||||||
v-model.number="model.configData.davisParamC"
|
v-model.number="model.configData.davisParamC"
|
||||||
@ -152,7 +244,7 @@
|
|||||||
hint=""
|
hint=""
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-4 q-px-sm">
|
<div class="col-3 q-px-sm">
|
||||||
<q-input
|
<q-input
|
||||||
outlined
|
outlined
|
||||||
v-model.number="model.configData.curveResistanceParamR1"
|
v-model.number="model.configData.curveResistanceParamR1"
|
||||||
@ -160,7 +252,7 @@
|
|||||||
hint=""
|
hint=""
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-4 q-px-sm">
|
<div class="col-3 q-px-sm">
|
||||||
<q-input
|
<q-input
|
||||||
outlined
|
outlined
|
||||||
v-model.number="model.configData.curveResistanceParamR2"
|
v-model.number="model.configData.curveResistanceParamR2"
|
||||||
@ -168,7 +260,7 @@
|
|||||||
hint=""
|
hint=""
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-4 q-px-sm">
|
<div class="col-3 q-px-sm">
|
||||||
<q-input
|
<q-input
|
||||||
outlined
|
outlined
|
||||||
v-model.number="model.configData.curveResistanceParamR3"
|
v-model.number="model.configData.curveResistanceParamR3"
|
||||||
@ -176,7 +268,7 @@
|
|||||||
hint=""
|
hint=""
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-4 q-px-sm">
|
<div class="col-3 q-px-sm">
|
||||||
<q-input
|
<q-input
|
||||||
outlined
|
outlined
|
||||||
v-model.number="model.configData.curveResistanceParamR4"
|
v-model.number="model.configData.curveResistanceParamR4"
|
||||||
@ -184,7 +276,7 @@
|
|||||||
hint=""
|
hint=""
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-4 q-px-sm">
|
<div class="col-3 q-px-sm">
|
||||||
<q-input
|
<q-input
|
||||||
outlined
|
outlined
|
||||||
v-model.number="model.configData.revolvingMassParam"
|
v-model.number="model.configData.revolvingMassParam"
|
||||||
@ -199,39 +291,48 @@
|
|||||||
<div class="float-text">故障</div>
|
<div class="float-text">故障</div>
|
||||||
<div class="stroke-box">
|
<div class="stroke-box">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-4 q-px-sm">
|
<div class="col-3 q-px-sm">
|
||||||
<q-input
|
<q-input
|
||||||
outlined
|
outlined
|
||||||
v-model.number="model.configData.slide"
|
v-model.number="model.configData.slide"
|
||||||
|
clearable
|
||||||
|
@clear="() => (model.configData.slide = 0)"
|
||||||
label="前溜/后溜(m/s)"
|
label="前溜/后溜(m/s)"
|
||||||
hint=""
|
hint=""
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-4 q-px-sm">
|
<div class="col-3 q-px-sm">
|
||||||
<q-input
|
<q-input
|
||||||
outlined
|
outlined
|
||||||
v-model.number="model.configData.slip"
|
v-model.number="model.configData.slip"
|
||||||
|
clearable
|
||||||
|
@clear="() => (model.configData.slip = 0)"
|
||||||
label="打滑(%)"
|
label="打滑(%)"
|
||||||
hint=""
|
hint=""
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-4 q-px-sm">
|
<div class="col-3 q-px-sm">
|
||||||
<q-input
|
<q-input
|
||||||
outlined
|
outlined
|
||||||
v-model.number="model.configData.stopSign"
|
v-model.number="model.configData.stopSign"
|
||||||
|
:default-value="0"
|
||||||
|
clearable
|
||||||
|
@clear="() => (model.configData.stopSign = 0)"
|
||||||
label="过标/欠标(mm)"
|
label="过标/欠标(mm)"
|
||||||
hint=""
|
hint=""
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-4 q-px-sm">
|
<div class="col-3 q-px-sm">
|
||||||
<q-input
|
<q-input
|
||||||
outlined
|
outlined
|
||||||
v-model.number="model.configData.idling"
|
v-model.number="model.configData.idling"
|
||||||
|
clearable
|
||||||
|
@clear="() => (model.configData.idling = 0)"
|
||||||
label="空转(%)"
|
label="空转(%)"
|
||||||
hint=""
|
hint=""
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-4 q-px-sm">
|
<div class="col-3 q-px-sm">
|
||||||
<q-checkbox
|
<q-checkbox
|
||||||
style="font-size: 12px"
|
style="font-size: 12px"
|
||||||
v-model="model.configData.jump"
|
v-model="model.configData.jump"
|
||||||
@ -242,7 +343,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<q-card-actions align="right" class="text-primary">
|
<q-card-actions align="right" class="text-primary">
|
||||||
<q-btn
|
<q-btn
|
||||||
flat
|
flat
|
||||||
@ -258,7 +358,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { QForm, useDialogPluginComponent } from 'quasar';
|
import { QForm } from 'quasar';
|
||||||
import { Train } from 'src/graphics/train/Train';
|
import { Train } from 'src/graphics/train/Train';
|
||||||
import { ref, onMounted, reactive, onUnmounted } from 'vue';
|
import { ref, onMounted, reactive, onUnmounted } from 'vue';
|
||||||
import DraggableDialog from 'src/components/common/DraggableDialog.vue';
|
import DraggableDialog from 'src/components/common/DraggableDialog.vue';
|
||||||
@ -281,6 +381,9 @@ const model = reactive({
|
|||||||
radarEnable: true,
|
radarEnable: true,
|
||||||
speedSensorEnableA: true,
|
speedSensorEnableA: true,
|
||||||
speedSensorEnableB: true,
|
speedSensorEnableB: true,
|
||||||
|
accEnable: true,
|
||||||
|
accCheckSpeedDiff: 0,
|
||||||
|
accCheckTime: 0,
|
||||||
},
|
},
|
||||||
trainEndsB: {
|
trainEndsB: {
|
||||||
radarCheckSpeedDiff: 0,
|
radarCheckSpeedDiff: 0,
|
||||||
@ -288,6 +391,9 @@ const model = reactive({
|
|||||||
radarEnable: true,
|
radarEnable: true,
|
||||||
speedSensorEnableA: true,
|
speedSensorEnableA: true,
|
||||||
speedSensorEnableB: true,
|
speedSensorEnableB: true,
|
||||||
|
accEnable: true,
|
||||||
|
accCheckSpeedDiff: 0,
|
||||||
|
accCheckTime: 0,
|
||||||
},
|
},
|
||||||
configData: {
|
configData: {
|
||||||
davisParamA: 0,
|
davisParamA: 0,
|
||||||
@ -327,6 +433,9 @@ function initModel() {
|
|||||||
radarEnable: trainState.aRadarEnable,
|
radarEnable: trainState.aRadarEnable,
|
||||||
speedSensorEnableA: trainState.aSpeedSensorEnableA,
|
speedSensorEnableA: trainState.aSpeedSensorEnableA,
|
||||||
speedSensorEnableB: trainState.aSpeedSensorEnableB,
|
speedSensorEnableB: trainState.aSpeedSensorEnableB,
|
||||||
|
accEnable: trainState.aAccEnable,
|
||||||
|
accCheckSpeedDiff: trainState.aAccCheckSpeedDiff,
|
||||||
|
accCheckTime: trainState.aAccCheckTime,
|
||||||
};
|
};
|
||||||
model.trainEndsB = {
|
model.trainEndsB = {
|
||||||
radarCheckSpeedDiff: trainState.bRadarCheckSpeedDiff,
|
radarCheckSpeedDiff: trainState.bRadarCheckSpeedDiff,
|
||||||
@ -334,6 +443,9 @@ function initModel() {
|
|||||||
radarEnable: trainState.bRadarEnable,
|
radarEnable: trainState.bRadarEnable,
|
||||||
speedSensorEnableA: trainState.bSpeedSensorEnableA,
|
speedSensorEnableA: trainState.bSpeedSensorEnableA,
|
||||||
speedSensorEnableB: trainState.bSpeedSensorEnableB,
|
speedSensorEnableB: trainState.bSpeedSensorEnableB,
|
||||||
|
accEnable: trainState.bAccEnable,
|
||||||
|
accCheckSpeedDiff: trainState.bAccCheckSpeedDiff,
|
||||||
|
accCheckTime: trainState.bAccCheckTime,
|
||||||
};
|
};
|
||||||
model.configData = {
|
model.configData = {
|
||||||
davisParamA: trainState.davisParamA,
|
davisParamA: trainState.davisParamA,
|
||||||
|
@ -27,70 +27,106 @@
|
|||||||
</q-item-section>
|
</q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
<q-separator inset />
|
<q-separator inset />
|
||||||
<q-item v-for="(item, index) in list2" :key="index">
|
<q-tabs
|
||||||
<q-item-section>
|
v-model="tab"
|
||||||
<q-item-label>{{ item.label }}</q-item-label>
|
inline-label
|
||||||
</q-item-section>
|
mobile-arrows
|
||||||
<q-item-section side>
|
class="bg-purple text-white shadow-2"
|
||||||
<q-item-label caption>{{
|
>
|
||||||
item.formatFn
|
<q-tab name="tab1" label="动力学" />
|
||||||
? item.formatFn(trainInfo[item.key])
|
<q-tab name="tab2" label="半实物" />
|
||||||
: trainInfo[item.key]
|
<q-tab name="tab3" label="速传" />
|
||||||
}}</q-item-label>
|
<q-tab name="tab4" label="雷达" />
|
||||||
</q-item-section>
|
<q-tab name="tab5" label="加速度计" />
|
||||||
</q-item>
|
</q-tabs>
|
||||||
<q-separator inset />
|
<q-separator />
|
||||||
<q-item v-for="(item, index) in list3" :key="index">
|
<q-tab-panels v-model="tab" animated>
|
||||||
<q-item-section>
|
<q-tab-panel name="tab1">
|
||||||
<q-item-label>{{ item.label }}</q-item-label>
|
<q-item v-for="(item, index) in list2" :key="index">
|
||||||
</q-item-section>
|
<q-item-section>
|
||||||
<q-item-section side>
|
<q-item-label>{{ item.label }}</q-item-label>
|
||||||
<q-item-label caption>{{
|
</q-item-section>
|
||||||
item.formatFn
|
<q-item-section side>
|
||||||
? item.formatFn(trainInfo[item.key])
|
<q-item-label caption>{{
|
||||||
: trainInfo[item.key]
|
item.formatFn
|
||||||
}}</q-item-label>
|
? item.formatFn(trainInfo[item.key])
|
||||||
</q-item-section>
|
: trainInfo[item.key]
|
||||||
</q-item>
|
}}</q-item-label>
|
||||||
<q-separator inset />
|
</q-item-section>
|
||||||
<q-item v-for="(item, index) in list4" :key="index">
|
</q-item>
|
||||||
<q-item-section>
|
</q-tab-panel>
|
||||||
<q-item-label>{{ item.label }}</q-item-label>
|
<q-tab-panel name="tab2">
|
||||||
</q-item-section>
|
<q-item v-for="(item, index) in list3" :key="index">
|
||||||
<q-item-section side>
|
<q-item-section>
|
||||||
<q-item-label caption>{{
|
<q-item-label>{{ item.label }}</q-item-label>
|
||||||
item.formatFn
|
</q-item-section>
|
||||||
? item.formatFn(trainInfo[item.key])
|
<q-item-section side>
|
||||||
: trainInfo[item.key]
|
<q-item-label caption>{{
|
||||||
}}</q-item-label>
|
item.formatFn
|
||||||
</q-item-section>
|
? item.formatFn(trainInfo[item.key])
|
||||||
</q-item>
|
: trainInfo[item.key]
|
||||||
<q-separator inset />
|
}}</q-item-label>
|
||||||
<q-item v-for="(item, index) in list5" :key="index">
|
</q-item-section>
|
||||||
<q-item-section>
|
</q-item>
|
||||||
<q-item-label>{{ item.label }}</q-item-label>
|
</q-tab-panel>
|
||||||
</q-item-section>
|
<q-tab-panel name="tab3">
|
||||||
<q-item-section side>
|
<q-item v-for="(item, index) in list4" :key="index">
|
||||||
<q-item-label caption>{{
|
<q-item-section>
|
||||||
item.formatFn
|
<q-item-label>{{ item.label }}</q-item-label>
|
||||||
? item.formatFn(trainInfo[item.key])
|
</q-item-section>
|
||||||
: trainInfo[item.key]
|
<q-item-section side>
|
||||||
}}</q-item-label>
|
<q-item-label caption>{{
|
||||||
</q-item-section>
|
item.formatFn
|
||||||
</q-item>
|
? item.formatFn(trainInfo[item.key])
|
||||||
<q-separator inset />
|
: trainInfo[item.key]
|
||||||
<q-item v-for="(item, index) in list6" :key="index">
|
}}</q-item-label>
|
||||||
<q-item-section>
|
</q-item-section>
|
||||||
<q-item-label>{{ item.label }}</q-item-label>
|
</q-item>
|
||||||
</q-item-section>
|
</q-tab-panel>
|
||||||
<q-item-section side>
|
<q-tab-panel name="tab4">
|
||||||
<q-item-label caption>{{
|
<q-item v-for="(item, index) in list5" :key="index">
|
||||||
item.formatFn
|
<q-item-section>
|
||||||
? item.formatFn(trainInfo[item.key])
|
<q-item-label>{{ item.label }}</q-item-label>
|
||||||
: trainInfo[item.key]
|
</q-item-section>
|
||||||
}}</q-item-label>
|
<q-item-section side>
|
||||||
</q-item-section>
|
<q-item-label caption>{{
|
||||||
</q-item>
|
item.formatFn
|
||||||
|
? item.formatFn(trainInfo[item.key])
|
||||||
|
: trainInfo[item.key]
|
||||||
|
}}</q-item-label>
|
||||||
|
</q-item-section>
|
||||||
|
</q-item>
|
||||||
|
</q-tab-panel>
|
||||||
|
<q-tab-panel name="tab5">
|
||||||
|
<q-item v-for="(item, index) in list6" :key="index">
|
||||||
|
<q-item-section>
|
||||||
|
<q-item-label>{{ item.label }}</q-item-label>
|
||||||
|
</q-item-section>
|
||||||
|
<q-item-section side>
|
||||||
|
<q-item-label caption>{{
|
||||||
|
item.formatFn
|
||||||
|
? item.formatFn(trainInfo[item.key])
|
||||||
|
: trainInfo[item.key]
|
||||||
|
}}</q-item-label>
|
||||||
|
</q-item-section>
|
||||||
|
</q-item>
|
||||||
|
</q-tab-panel>
|
||||||
|
</q-tab-panels>
|
||||||
|
<!-- <q-list class="rounded-borders" dense>
|
||||||
|
<q-expansion-item label="动力学" header-class="text-purple">
|
||||||
|
</q-expansion-item>
|
||||||
|
<q-expansion-item label="半实物" header-class="text-purple">
|
||||||
|
</q-expansion-item>
|
||||||
|
<q-expansion-item label="速传" header-class="text-purple">
|
||||||
|
|
||||||
|
</q-expansion-item>
|
||||||
|
<q-expansion-item label="雷达" header-class="text-purple">
|
||||||
|
|
||||||
|
</q-expansion-item>
|
||||||
|
<q-expansion-item label="加速度计" header-class="text-purple">
|
||||||
|
|
||||||
|
</q-expansion-item>
|
||||||
|
</q-list> -->
|
||||||
</q-list>
|
</q-list>
|
||||||
</q-card>
|
</q-card>
|
||||||
</template>
|
</template>
|
||||||
@ -108,7 +144,7 @@ interface KeyType {
|
|||||||
key: keyof ITrainState;
|
key: keyof ITrainState;
|
||||||
formatFn?(v: ITrainState[keyof ITrainState]): string;
|
formatFn?(v: ITrainState[keyof ITrainState]): string;
|
||||||
}
|
}
|
||||||
|
const tab = ref('tab1');
|
||||||
const lineStore = useLineStore();
|
const lineStore = useLineStore();
|
||||||
const trainInfo = ref<ITrainState | null>();
|
const trainInfo = ref<ITrainState | null>();
|
||||||
const list: KeyType[] = [
|
const list: KeyType[] = [
|
||||||
@ -160,14 +196,20 @@ const list2: KeyType[] = [
|
|||||||
{ label: '坡道阻力', key: 'rampResistance', formatFn: resistanceFormat },
|
{ label: '坡道阻力', key: 'rampResistance', formatFn: resistanceFormat },
|
||||||
{ label: '曲线阻力', key: 'curveResistance', formatFn: resistanceFormat },
|
{ label: '曲线阻力', key: 'curveResistance', formatFn: resistanceFormat },
|
||||||
{ label: '列车运行速度', key: 'speed', formatFn: speedFormat },
|
{ label: '列车运行速度', key: 'speed', formatFn: speedFormat },
|
||||||
{ label: '头车速传1速度值', key: 'headSensorSpeed1', formatFn: speedFormat },
|
|
||||||
{ label: '头车速传2速度值', key: 'headSensorSpeed2', formatFn: speedFormat },
|
|
||||||
{ label: '尾车速传1速度值', key: 'tailSensorSpeed1', formatFn: speedFormat },
|
|
||||||
{ label: '尾车速传2速度值', key: 'tailSensorSpeed2', formatFn: speedFormat },
|
|
||||||
{ label: '头车雷达速度值', key: 'headRadarSpeed', formatFn: speedFormat },
|
|
||||||
{ label: '尾车雷达速度值', key: 'tailRadarSpeed', formatFn: speedFormat },
|
|
||||||
// { label: '通讯中断', key: 'udpInterruption', formatFn: upFormat },
|
// { label: '通讯中断', key: 'udpInterruption', formatFn: upFormat },
|
||||||
{ label: '加速度', key: 'acceleration', formatFn: accelerationFormat },
|
{ label: '基本阻力参数A', key: 'davisParamA' },
|
||||||
|
{ label: '基本阻力参数B', key: 'davisParamB' },
|
||||||
|
{ label: '基本阻力参数C', key: 'davisParamC' },
|
||||||
|
{ label: '曲线阻力参数R1', key: 'curveResistanceParamR1' },
|
||||||
|
{ label: '曲线阻力参数R2', key: 'curveResistanceParamR2' },
|
||||||
|
{ label: '曲线阻力参数R3', key: 'curveResistanceParamR3' },
|
||||||
|
{ label: '曲线阻力参数R4', key: 'curveResistanceParamR4' },
|
||||||
|
{ label: '旋转质量参数', key: 'revolvingMassParam' },
|
||||||
|
{ label: '是否跳跃', key: 'jump', formatFn: upFormat },
|
||||||
|
{ label: '打滑', key: 'slip', formatFn: percentFormat },
|
||||||
|
{ label: '前溜/后溜', key: 'slide', formatFn: msFormat },
|
||||||
|
{ label: '过标/欠标', key: 'stopSign', formatFn: mmFormat },
|
||||||
|
{ label: '空转', key: 'idling', formatFn: percentFormat },
|
||||||
];
|
];
|
||||||
const list3: KeyType[] = [
|
const list3: KeyType[] = [
|
||||||
// 半实物信息
|
// 半实物信息
|
||||||
@ -227,23 +269,18 @@ const list3: KeyType[] = [
|
|||||||
];
|
];
|
||||||
|
|
||||||
const list4: KeyType[] = [
|
const list4: KeyType[] = [
|
||||||
{ label: '基本阻力参数A', key: 'davisParamA' },
|
// { label: '头车速传1速度值', key: 'headSensorSpeed1', formatFn: speedFormat },
|
||||||
{ label: '基本阻力参数B', key: 'davisParamB' },
|
// { label: '头车速传2速度值', key: 'headSensorSpeed2', formatFn: speedFormat },
|
||||||
{ label: '基本阻力参数C', key: 'davisParamC' },
|
// { label: '尾车速传1速度值', key: 'tailSensorSpeed1', formatFn: speedFormat },
|
||||||
{ label: '曲线阻力参数R1', key: 'curveResistanceParamR1' },
|
// { label: '尾车速传2速度值', key: 'tailSensorSpeed2', formatFn: speedFormat },
|
||||||
{ label: '曲线阻力参数R2', key: 'curveResistanceParamR2' },
|
|
||||||
{ label: '曲线阻力参数R3', key: 'curveResistanceParamR3' },
|
|
||||||
{ label: '曲线阻力参数R4', key: 'curveResistanceParamR4' },
|
|
||||||
{ label: '旋转质量参数', key: 'revolvingMassParam' },
|
|
||||||
{ label: '是否跳跃', key: 'jump', formatFn: upFormat },
|
|
||||||
{ label: '打滑', key: 'slip', formatFn: percentFormat },
|
|
||||||
{ label: '前溜/后溜', key: 'slide', formatFn: msFormat },
|
|
||||||
{ label: '过标/欠标', key: 'stopSign', formatFn: mmFormat },
|
|
||||||
{ label: '空转', key: 'idling', formatFn: percentFormat },
|
|
||||||
];
|
|
||||||
const list5: KeyType[] = [
|
|
||||||
{ label: '1端速传1是否有效', key: 'aSpeedSensorEnableA', formatFn: upFormat },
|
{ label: '1端速传1是否有效', key: 'aSpeedSensorEnableA', formatFn: upFormat },
|
||||||
{ label: '1端速传2是否有效', key: 'aSpeedSensorEnableB', formatFn: upFormat },
|
{ label: '1端速传2是否有效', key: 'aSpeedSensorEnableB', formatFn: upFormat },
|
||||||
|
{ label: '2端速传1是否有效', key: 'bSpeedSensorEnableA', formatFn: upFormat },
|
||||||
|
{ label: '2端速传2是否有效', key: 'bSpeedSensorEnableB', formatFn: upFormat },
|
||||||
|
];
|
||||||
|
const list5: KeyType[] = [
|
||||||
|
// { label: '头车雷达速度值', key: 'headRadarSpeed', formatFn: speedFormat },
|
||||||
|
// { label: '尾车雷达速度值', key: 'tailRadarSpeed', formatFn: speedFormat },
|
||||||
{ label: '1端雷达是否有效', key: 'aRadarEnable', formatFn: upFormat },
|
{ label: '1端雷达是否有效', key: 'aRadarEnable', formatFn: upFormat },
|
||||||
{ label: '1端雷达测速差值', key: 'aRadarCheckSpeedDiff', formatFn: msFormat },
|
{ label: '1端雷达测速差值', key: 'aRadarCheckSpeedDiff', formatFn: msFormat },
|
||||||
{
|
{
|
||||||
@ -251,10 +288,6 @@ const list5: KeyType[] = [
|
|||||||
key: 'aRadarCheckTime',
|
key: 'aRadarCheckTime',
|
||||||
formatFn: timeFormat,
|
formatFn: timeFormat,
|
||||||
},
|
},
|
||||||
];
|
|
||||||
const list6: KeyType[] = [
|
|
||||||
{ label: '2端速传1是否有效', key: 'bSpeedSensorEnableA', formatFn: upFormat },
|
|
||||||
{ label: '2端速传2是否有效', key: 'bSpeedSensorEnableB', formatFn: upFormat },
|
|
||||||
{ label: '2端雷达是否有效', key: 'bRadarEnable', formatFn: upFormat },
|
{ label: '2端雷达是否有效', key: 'bRadarEnable', formatFn: upFormat },
|
||||||
{ label: '2端雷达测速差值', key: 'bRadarCheckSpeedDiff', formatFn: msFormat },
|
{ label: '2端雷达测速差值', key: 'bRadarCheckSpeedDiff', formatFn: msFormat },
|
||||||
{
|
{
|
||||||
@ -263,6 +296,23 @@ const list6: KeyType[] = [
|
|||||||
formatFn: timeFormat,
|
formatFn: timeFormat,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
const list6: KeyType[] = [
|
||||||
|
{ label: '加速度', key: 'acceleration', formatFn: accelerationFormat },
|
||||||
|
{ label: '1端加速度计是否有效', key: 'aAccEnable', formatFn: upFormat },
|
||||||
|
{ label: '1端加速度测速差值', key: 'aAccCheckSpeedDiff', formatFn: msFormat },
|
||||||
|
{
|
||||||
|
label: '1端加速度持续时间',
|
||||||
|
key: 'aAccCheckTime',
|
||||||
|
formatFn: timeFormat,
|
||||||
|
},
|
||||||
|
{ label: '2端加速度计是否有效', key: 'bAccEnable', formatFn: upFormat },
|
||||||
|
{ label: '2端加速度测速差值', key: 'bAccCheckSpeedDiff', formatFn: msFormat },
|
||||||
|
{
|
||||||
|
label: '2端加速度持续时间',
|
||||||
|
key: 'bAccCheckTime',
|
||||||
|
formatFn: timeFormat,
|
||||||
|
},
|
||||||
|
];
|
||||||
function mmFormat(v: number) {
|
function mmFormat(v: number) {
|
||||||
return v + 'mm';
|
return v + 'mm';
|
||||||
}
|
}
|
||||||
@ -408,6 +458,7 @@ watch(
|
|||||||
function getTrainStates(train: Train) {
|
function getTrainStates(train: Train) {
|
||||||
trainInfo.value = null;
|
trainInfo.value = null;
|
||||||
const s = train.states as ITrainState;
|
const s = train.states as ITrainState;
|
||||||
|
console.log(s, '=======');
|
||||||
trainInfo.value = s;
|
trainInfo.value = s;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -453,3 +504,8 @@ function setTrain() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.q-item {
|
||||||
|
min-height: 32px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
@ -534,6 +534,42 @@ export class TrainState extends GraphicStateBase implements ITrainState {
|
|||||||
set bRadarCheckTime(v: number) {
|
set bRadarCheckTime(v: number) {
|
||||||
this.states.trainEndsB.radarCheckTime = v;
|
this.states.trainEndsB.radarCheckTime = v;
|
||||||
}
|
}
|
||||||
|
get aAccEnable(): boolean {
|
||||||
|
return this.states.trainEndsA.accEnable;
|
||||||
|
}
|
||||||
|
set aAccEnable(v: boolean) {
|
||||||
|
this.states.trainEndsA.accEnable = v;
|
||||||
|
}
|
||||||
|
get aAccCheckTime(): number {
|
||||||
|
return this.states.trainEndsA.accCheckTime;
|
||||||
|
}
|
||||||
|
set aAccCheckTime(v: number) {
|
||||||
|
this.states.trainEndsA.accCheckTime = v;
|
||||||
|
}
|
||||||
|
get aAccCheckSpeedDiff(): number {
|
||||||
|
return +this.states.trainEndsA.accCheckSpeedDiff;
|
||||||
|
}
|
||||||
|
set aAccCheckSpeedDiff(v: number) {
|
||||||
|
this.states.trainEndsA.accCheckSpeedDiff = v + '';
|
||||||
|
}
|
||||||
|
get bAccEnable(): boolean {
|
||||||
|
return this.states.trainEndsB.accEnable;
|
||||||
|
}
|
||||||
|
set bAccEnable(v: boolean) {
|
||||||
|
this.states.trainEndsB.accEnable = v;
|
||||||
|
}
|
||||||
|
get bAccCheckTime(): number {
|
||||||
|
return this.states.trainEndsB.accCheckTime;
|
||||||
|
}
|
||||||
|
set bAccCheckTime(v: number) {
|
||||||
|
this.states.trainEndsB.accCheckTime = v;
|
||||||
|
}
|
||||||
|
get bAccCheckSpeedDiff(): number {
|
||||||
|
return +this.states.trainEndsB.accCheckSpeedDiff;
|
||||||
|
}
|
||||||
|
set bAccCheckSpeedDiff(v: number) {
|
||||||
|
this.states.trainEndsB.accCheckSpeedDiff = v + '';
|
||||||
|
}
|
||||||
clone(): TrainState {
|
clone(): TrainState {
|
||||||
return new TrainState(this.states.cloneMessage());
|
return new TrainState(this.states.cloneMessage());
|
||||||
}
|
}
|
||||||
|
@ -193,6 +193,18 @@ export interface ITrainState extends GraphicState {
|
|||||||
set bRadarCheckSpeedDiff(v: number);
|
set bRadarCheckSpeedDiff(v: number);
|
||||||
get bRadarCheckTime(): number;
|
get bRadarCheckTime(): number;
|
||||||
set bRadarCheckTime(v: number);
|
set bRadarCheckTime(v: number);
|
||||||
|
get aAccEnable(): boolean;
|
||||||
|
set aAccEnable(v: boolean);
|
||||||
|
get aAccCheckSpeedDiff(): number;
|
||||||
|
set aAccCheckSpeedDiff(v: number);
|
||||||
|
get aAccCheckTime(): number;
|
||||||
|
set aAccCheckTime(v: number);
|
||||||
|
get bAccEnable(): boolean;
|
||||||
|
set bAccEnable(v: boolean);
|
||||||
|
get bAccCheckSpeedDiff(): number;
|
||||||
|
set bAccCheckSpeedDiff(v: number);
|
||||||
|
get bAccCheckTime(): number;
|
||||||
|
set bAccCheckTime(v: number);
|
||||||
}
|
}
|
||||||
interface bodyWH {
|
interface bodyWH {
|
||||||
width: number; // 宽
|
width: number; // 宽
|
||||||
|
@ -356,6 +356,9 @@ export namespace common {
|
|||||||
radarEnable?: boolean;
|
radarEnable?: boolean;
|
||||||
radarCheckSpeedDiff?: number;
|
radarCheckSpeedDiff?: number;
|
||||||
radarCheckTime?: number;
|
radarCheckTime?: number;
|
||||||
|
accEnable?: boolean;
|
||||||
|
accCheckSpeedDiff?: number;
|
||||||
|
accCheckTime?: number;
|
||||||
}) {
|
}) {
|
||||||
super();
|
super();
|
||||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
||||||
@ -375,6 +378,15 @@ export namespace common {
|
|||||||
if ("radarCheckTime" in data && data.radarCheckTime != undefined) {
|
if ("radarCheckTime" in data && data.radarCheckTime != undefined) {
|
||||||
this.radarCheckTime = data.radarCheckTime;
|
this.radarCheckTime = data.radarCheckTime;
|
||||||
}
|
}
|
||||||
|
if ("accEnable" in data && data.accEnable != undefined) {
|
||||||
|
this.accEnable = data.accEnable;
|
||||||
|
}
|
||||||
|
if ("accCheckSpeedDiff" in data && data.accCheckSpeedDiff != undefined) {
|
||||||
|
this.accCheckSpeedDiff = data.accCheckSpeedDiff;
|
||||||
|
}
|
||||||
|
if ("accCheckTime" in data && data.accCheckTime != undefined) {
|
||||||
|
this.accCheckTime = data.accCheckTime;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
get speedSensorEnableA() {
|
get speedSensorEnableA() {
|
||||||
@ -407,12 +419,33 @@ export namespace common {
|
|||||||
set radarCheckTime(value: number) {
|
set radarCheckTime(value: number) {
|
||||||
pb_1.Message.setField(this, 5, value);
|
pb_1.Message.setField(this, 5, value);
|
||||||
}
|
}
|
||||||
|
get accEnable() {
|
||||||
|
return pb_1.Message.getFieldWithDefault(this, 6, false) as boolean;
|
||||||
|
}
|
||||||
|
set accEnable(value: boolean) {
|
||||||
|
pb_1.Message.setField(this, 6, value);
|
||||||
|
}
|
||||||
|
get accCheckSpeedDiff() {
|
||||||
|
return pb_1.Message.getFieldWithDefault(this, 7, 0) as number;
|
||||||
|
}
|
||||||
|
set accCheckSpeedDiff(value: number) {
|
||||||
|
pb_1.Message.setField(this, 7, value);
|
||||||
|
}
|
||||||
|
get accCheckTime() {
|
||||||
|
return pb_1.Message.getFieldWithDefault(this, 8, 0) as number;
|
||||||
|
}
|
||||||
|
set accCheckTime(value: number) {
|
||||||
|
pb_1.Message.setField(this, 8, value);
|
||||||
|
}
|
||||||
static fromObject(data: {
|
static fromObject(data: {
|
||||||
speedSensorEnableA?: boolean;
|
speedSensorEnableA?: boolean;
|
||||||
speedSensorEnableB?: boolean;
|
speedSensorEnableB?: boolean;
|
||||||
radarEnable?: boolean;
|
radarEnable?: boolean;
|
||||||
radarCheckSpeedDiff?: number;
|
radarCheckSpeedDiff?: number;
|
||||||
radarCheckTime?: number;
|
radarCheckTime?: number;
|
||||||
|
accEnable?: boolean;
|
||||||
|
accCheckSpeedDiff?: number;
|
||||||
|
accCheckTime?: number;
|
||||||
}): TrainEndsState {
|
}): TrainEndsState {
|
||||||
const message = new TrainEndsState({});
|
const message = new TrainEndsState({});
|
||||||
if (data.speedSensorEnableA != null) {
|
if (data.speedSensorEnableA != null) {
|
||||||
@ -430,6 +463,15 @@ export namespace common {
|
|||||||
if (data.radarCheckTime != null) {
|
if (data.radarCheckTime != null) {
|
||||||
message.radarCheckTime = data.radarCheckTime;
|
message.radarCheckTime = data.radarCheckTime;
|
||||||
}
|
}
|
||||||
|
if (data.accEnable != null) {
|
||||||
|
message.accEnable = data.accEnable;
|
||||||
|
}
|
||||||
|
if (data.accCheckSpeedDiff != null) {
|
||||||
|
message.accCheckSpeedDiff = data.accCheckSpeedDiff;
|
||||||
|
}
|
||||||
|
if (data.accCheckTime != null) {
|
||||||
|
message.accCheckTime = data.accCheckTime;
|
||||||
|
}
|
||||||
return message;
|
return message;
|
||||||
}
|
}
|
||||||
toObject() {
|
toObject() {
|
||||||
@ -439,6 +481,9 @@ export namespace common {
|
|||||||
radarEnable?: boolean;
|
radarEnable?: boolean;
|
||||||
radarCheckSpeedDiff?: number;
|
radarCheckSpeedDiff?: number;
|
||||||
radarCheckTime?: number;
|
radarCheckTime?: number;
|
||||||
|
accEnable?: boolean;
|
||||||
|
accCheckSpeedDiff?: number;
|
||||||
|
accCheckTime?: number;
|
||||||
} = {};
|
} = {};
|
||||||
if (this.speedSensorEnableA != null) {
|
if (this.speedSensorEnableA != null) {
|
||||||
data.speedSensorEnableA = this.speedSensorEnableA;
|
data.speedSensorEnableA = this.speedSensorEnableA;
|
||||||
@ -455,6 +500,15 @@ export namespace common {
|
|||||||
if (this.radarCheckTime != null) {
|
if (this.radarCheckTime != null) {
|
||||||
data.radarCheckTime = this.radarCheckTime;
|
data.radarCheckTime = this.radarCheckTime;
|
||||||
}
|
}
|
||||||
|
if (this.accEnable != null) {
|
||||||
|
data.accEnable = this.accEnable;
|
||||||
|
}
|
||||||
|
if (this.accCheckSpeedDiff != null) {
|
||||||
|
data.accCheckSpeedDiff = this.accCheckSpeedDiff;
|
||||||
|
}
|
||||||
|
if (this.accCheckTime != null) {
|
||||||
|
data.accCheckTime = this.accCheckTime;
|
||||||
|
}
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
serialize(): Uint8Array;
|
serialize(): Uint8Array;
|
||||||
@ -471,6 +525,12 @@ export namespace common {
|
|||||||
writer.writeFloat(4, this.radarCheckSpeedDiff);
|
writer.writeFloat(4, this.radarCheckSpeedDiff);
|
||||||
if (this.radarCheckTime != 0)
|
if (this.radarCheckTime != 0)
|
||||||
writer.writeInt32(5, this.radarCheckTime);
|
writer.writeInt32(5, this.radarCheckTime);
|
||||||
|
if (this.accEnable != false)
|
||||||
|
writer.writeBool(6, this.accEnable);
|
||||||
|
if (this.accCheckSpeedDiff != 0)
|
||||||
|
writer.writeFloat(7, this.accCheckSpeedDiff);
|
||||||
|
if (this.accCheckTime != 0)
|
||||||
|
writer.writeInt32(8, this.accCheckTime);
|
||||||
if (!w)
|
if (!w)
|
||||||
return writer.getResultBuffer();
|
return writer.getResultBuffer();
|
||||||
}
|
}
|
||||||
@ -495,6 +555,15 @@ export namespace common {
|
|||||||
case 5:
|
case 5:
|
||||||
message.radarCheckTime = reader.readInt32();
|
message.radarCheckTime = reader.readInt32();
|
||||||
break;
|
break;
|
||||||
|
case 6:
|
||||||
|
message.accEnable = reader.readBool();
|
||||||
|
break;
|
||||||
|
case 7:
|
||||||
|
message.accCheckSpeedDiff = reader.readFloat();
|
||||||
|
break;
|
||||||
|
case 8:
|
||||||
|
message.accCheckTime = reader.readInt32();
|
||||||
|
break;
|
||||||
default: reader.skipField();
|
default: reader.skipField();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1536,6 +1536,7 @@ export namespace state {
|
|||||||
tailRadarSpeed?: number;
|
tailRadarSpeed?: number;
|
||||||
udpInterruption?: boolean;
|
udpInterruption?: boolean;
|
||||||
acceleration?: number;
|
acceleration?: number;
|
||||||
|
Displacement?: number;
|
||||||
}) {
|
}) {
|
||||||
super();
|
super();
|
||||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [6], this.#one_of_decls);
|
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [6], this.#one_of_decls);
|
||||||
@ -1606,6 +1607,9 @@ export namespace state {
|
|||||||
if ("acceleration" in data && data.acceleration != undefined) {
|
if ("acceleration" in data && data.acceleration != undefined) {
|
||||||
this.acceleration = data.acceleration;
|
this.acceleration = data.acceleration;
|
||||||
}
|
}
|
||||||
|
if ("Displacement" in data && data.Displacement != undefined) {
|
||||||
|
this.Displacement = data.Displacement;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
get heartbeat() {
|
get heartbeat() {
|
||||||
@ -1740,6 +1744,12 @@ export namespace state {
|
|||||||
set acceleration(value: number) {
|
set acceleration(value: number) {
|
||||||
pb_1.Message.setField(this, 22, value);
|
pb_1.Message.setField(this, 22, value);
|
||||||
}
|
}
|
||||||
|
get Displacement() {
|
||||||
|
return pb_1.Message.getFieldWithDefault(this, 23, 0) as number;
|
||||||
|
}
|
||||||
|
set Displacement(value: number) {
|
||||||
|
pb_1.Message.setField(this, 23, value);
|
||||||
|
}
|
||||||
static fromObject(data: {
|
static fromObject(data: {
|
||||||
heartbeat?: number;
|
heartbeat?: number;
|
||||||
headLinkId?: string;
|
headLinkId?: string;
|
||||||
@ -1763,6 +1773,7 @@ export namespace state {
|
|||||||
tailRadarSpeed?: number;
|
tailRadarSpeed?: number;
|
||||||
udpInterruption?: boolean;
|
udpInterruption?: boolean;
|
||||||
acceleration?: number;
|
acceleration?: number;
|
||||||
|
Displacement?: number;
|
||||||
}): TrainDynamicState {
|
}): TrainDynamicState {
|
||||||
const message = new TrainDynamicState({});
|
const message = new TrainDynamicState({});
|
||||||
if (data.heartbeat != null) {
|
if (data.heartbeat != null) {
|
||||||
@ -1831,6 +1842,9 @@ export namespace state {
|
|||||||
if (data.acceleration != null) {
|
if (data.acceleration != null) {
|
||||||
message.acceleration = data.acceleration;
|
message.acceleration = data.acceleration;
|
||||||
}
|
}
|
||||||
|
if (data.Displacement != null) {
|
||||||
|
message.Displacement = data.Displacement;
|
||||||
|
}
|
||||||
return message;
|
return message;
|
||||||
}
|
}
|
||||||
toObject() {
|
toObject() {
|
||||||
@ -1857,6 +1871,7 @@ export namespace state {
|
|||||||
tailRadarSpeed?: number;
|
tailRadarSpeed?: number;
|
||||||
udpInterruption?: boolean;
|
udpInterruption?: boolean;
|
||||||
acceleration?: number;
|
acceleration?: number;
|
||||||
|
Displacement?: number;
|
||||||
} = {};
|
} = {};
|
||||||
if (this.heartbeat != null) {
|
if (this.heartbeat != null) {
|
||||||
data.heartbeat = this.heartbeat;
|
data.heartbeat = this.heartbeat;
|
||||||
@ -1924,6 +1939,9 @@ export namespace state {
|
|||||||
if (this.acceleration != null) {
|
if (this.acceleration != null) {
|
||||||
data.acceleration = this.acceleration;
|
data.acceleration = this.acceleration;
|
||||||
}
|
}
|
||||||
|
if (this.Displacement != null) {
|
||||||
|
data.Displacement = this.Displacement;
|
||||||
|
}
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
serialize(): Uint8Array;
|
serialize(): Uint8Array;
|
||||||
@ -1974,6 +1992,8 @@ export namespace state {
|
|||||||
writer.writeBool(21, this.udpInterruption);
|
writer.writeBool(21, this.udpInterruption);
|
||||||
if (this.acceleration != 0)
|
if (this.acceleration != 0)
|
||||||
writer.writeFloat(22, this.acceleration);
|
writer.writeFloat(22, this.acceleration);
|
||||||
|
if (this.Displacement != 0)
|
||||||
|
writer.writeInt32(23, this.Displacement);
|
||||||
if (!w)
|
if (!w)
|
||||||
return writer.getResultBuffer();
|
return writer.getResultBuffer();
|
||||||
}
|
}
|
||||||
@ -2049,6 +2069,9 @@ export namespace state {
|
|||||||
case 22:
|
case 22:
|
||||||
message.acceleration = reader.readFloat();
|
message.acceleration = reader.readFloat();
|
||||||
break;
|
break;
|
||||||
|
case 23:
|
||||||
|
message.Displacement = reader.readInt32();
|
||||||
|
break;
|
||||||
default: reader.skipField();
|
default: reader.skipField();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2770,6 +2793,7 @@ export namespace state {
|
|||||||
trainDynamicConfig?: TrainDynamicConfigMqtt;
|
trainDynamicConfig?: TrainDynamicConfigMqtt;
|
||||||
trainEndsA?: TrainEndsStateMqtt;
|
trainEndsA?: TrainEndsStateMqtt;
|
||||||
trainEndsB?: TrainEndsStateMqtt;
|
trainEndsB?: TrainEndsStateMqtt;
|
||||||
|
Displacement?: number;
|
||||||
}) {
|
}) {
|
||||||
super();
|
super();
|
||||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [20], this.#one_of_decls);
|
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [20], this.#one_of_decls);
|
||||||
@ -2966,6 +2990,9 @@ export namespace state {
|
|||||||
if ("trainEndsB" in data && data.trainEndsB != undefined) {
|
if ("trainEndsB" in data && data.trainEndsB != undefined) {
|
||||||
this.trainEndsB = data.trainEndsB;
|
this.trainEndsB = data.trainEndsB;
|
||||||
}
|
}
|
||||||
|
if ("Displacement" in data && data.Displacement != undefined) {
|
||||||
|
this.Displacement = data.Displacement;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
get id() {
|
get id() {
|
||||||
@ -3361,6 +3388,12 @@ export namespace state {
|
|||||||
get has_trainEndsB() {
|
get has_trainEndsB() {
|
||||||
return pb_1.Message.getField(this, 64) != null;
|
return pb_1.Message.getField(this, 64) != null;
|
||||||
}
|
}
|
||||||
|
get Displacement() {
|
||||||
|
return pb_1.Message.getFieldWithDefault(this, 65, 0) as number;
|
||||||
|
}
|
||||||
|
set Displacement(value: number) {
|
||||||
|
pb_1.Message.setField(this, 65, value);
|
||||||
|
}
|
||||||
static fromObject(data: {
|
static fromObject(data: {
|
||||||
id?: string;
|
id?: string;
|
||||||
up?: boolean;
|
up?: boolean;
|
||||||
@ -3426,6 +3459,7 @@ export namespace state {
|
|||||||
trainDynamicConfig?: ReturnType<typeof TrainDynamicConfigMqtt.prototype.toObject>;
|
trainDynamicConfig?: ReturnType<typeof TrainDynamicConfigMqtt.prototype.toObject>;
|
||||||
trainEndsA?: ReturnType<typeof TrainEndsStateMqtt.prototype.toObject>;
|
trainEndsA?: ReturnType<typeof TrainEndsStateMqtt.prototype.toObject>;
|
||||||
trainEndsB?: ReturnType<typeof TrainEndsStateMqtt.prototype.toObject>;
|
trainEndsB?: ReturnType<typeof TrainEndsStateMqtt.prototype.toObject>;
|
||||||
|
Displacement?: number;
|
||||||
}): TrainMapState {
|
}): TrainMapState {
|
||||||
const message = new TrainMapState({});
|
const message = new TrainMapState({});
|
||||||
if (data.id != null) {
|
if (data.id != null) {
|
||||||
@ -3620,6 +3654,9 @@ export namespace state {
|
|||||||
if (data.trainEndsB != null) {
|
if (data.trainEndsB != null) {
|
||||||
message.trainEndsB = TrainEndsStateMqtt.fromObject(data.trainEndsB);
|
message.trainEndsB = TrainEndsStateMqtt.fromObject(data.trainEndsB);
|
||||||
}
|
}
|
||||||
|
if (data.Displacement != null) {
|
||||||
|
message.Displacement = data.Displacement;
|
||||||
|
}
|
||||||
return message;
|
return message;
|
||||||
}
|
}
|
||||||
toObject() {
|
toObject() {
|
||||||
@ -3688,6 +3725,7 @@ export namespace state {
|
|||||||
trainDynamicConfig?: ReturnType<typeof TrainDynamicConfigMqtt.prototype.toObject>;
|
trainDynamicConfig?: ReturnType<typeof TrainDynamicConfigMqtt.prototype.toObject>;
|
||||||
trainEndsA?: ReturnType<typeof TrainEndsStateMqtt.prototype.toObject>;
|
trainEndsA?: ReturnType<typeof TrainEndsStateMqtt.prototype.toObject>;
|
||||||
trainEndsB?: ReturnType<typeof TrainEndsStateMqtt.prototype.toObject>;
|
trainEndsB?: ReturnType<typeof TrainEndsStateMqtt.prototype.toObject>;
|
||||||
|
Displacement?: number;
|
||||||
} = {};
|
} = {};
|
||||||
if (this.id != null) {
|
if (this.id != null) {
|
||||||
data.id = this.id;
|
data.id = this.id;
|
||||||
@ -3881,6 +3919,9 @@ export namespace state {
|
|||||||
if (this.trainEndsB != null) {
|
if (this.trainEndsB != null) {
|
||||||
data.trainEndsB = this.trainEndsB.toObject();
|
data.trainEndsB = this.trainEndsB.toObject();
|
||||||
}
|
}
|
||||||
|
if (this.Displacement != null) {
|
||||||
|
data.Displacement = this.Displacement;
|
||||||
|
}
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
serialize(): Uint8Array;
|
serialize(): Uint8Array;
|
||||||
@ -4015,6 +4056,8 @@ export namespace state {
|
|||||||
writer.writeMessage(63, this.trainEndsA, () => this.trainEndsA.serialize(writer));
|
writer.writeMessage(63, this.trainEndsA, () => this.trainEndsA.serialize(writer));
|
||||||
if (this.has_trainEndsB)
|
if (this.has_trainEndsB)
|
||||||
writer.writeMessage(64, this.trainEndsB, () => this.trainEndsB.serialize(writer));
|
writer.writeMessage(64, this.trainEndsB, () => this.trainEndsB.serialize(writer));
|
||||||
|
if (this.Displacement != 0)
|
||||||
|
writer.writeInt32(65, this.Displacement);
|
||||||
if (!w)
|
if (!w)
|
||||||
return writer.getResultBuffer();
|
return writer.getResultBuffer();
|
||||||
}
|
}
|
||||||
@ -4216,6 +4259,9 @@ export namespace state {
|
|||||||
case 64:
|
case 64:
|
||||||
reader.readMessage(message.trainEndsB, () => message.trainEndsB = TrainEndsStateMqtt.deserialize(reader));
|
reader.readMessage(message.trainEndsB, () => message.trainEndsB = TrainEndsStateMqtt.deserialize(reader));
|
||||||
break;
|
break;
|
||||||
|
case 65:
|
||||||
|
message.Displacement = reader.readInt32();
|
||||||
|
break;
|
||||||
default: reader.skipField();
|
default: reader.skipField();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -4579,6 +4625,9 @@ export namespace state {
|
|||||||
radarEnable?: boolean;
|
radarEnable?: boolean;
|
||||||
radarCheckSpeedDiff?: string;
|
radarCheckSpeedDiff?: string;
|
||||||
radarCheckTime?: number;
|
radarCheckTime?: number;
|
||||||
|
accEnable?: boolean;
|
||||||
|
accCheckSpeedDiff?: string;
|
||||||
|
accCheckTime?: number;
|
||||||
}) {
|
}) {
|
||||||
super();
|
super();
|
||||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
||||||
@ -4598,6 +4647,15 @@ export namespace state {
|
|||||||
if ("radarCheckTime" in data && data.radarCheckTime != undefined) {
|
if ("radarCheckTime" in data && data.radarCheckTime != undefined) {
|
||||||
this.radarCheckTime = data.radarCheckTime;
|
this.radarCheckTime = data.radarCheckTime;
|
||||||
}
|
}
|
||||||
|
if ("accEnable" in data && data.accEnable != undefined) {
|
||||||
|
this.accEnable = data.accEnable;
|
||||||
|
}
|
||||||
|
if ("accCheckSpeedDiff" in data && data.accCheckSpeedDiff != undefined) {
|
||||||
|
this.accCheckSpeedDiff = data.accCheckSpeedDiff;
|
||||||
|
}
|
||||||
|
if ("accCheckTime" in data && data.accCheckTime != undefined) {
|
||||||
|
this.accCheckTime = data.accCheckTime;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
get speedSensorEnableA() {
|
get speedSensorEnableA() {
|
||||||
@ -4630,12 +4688,33 @@ export namespace state {
|
|||||||
set radarCheckTime(value: number) {
|
set radarCheckTime(value: number) {
|
||||||
pb_1.Message.setField(this, 5, value);
|
pb_1.Message.setField(this, 5, value);
|
||||||
}
|
}
|
||||||
|
get accEnable() {
|
||||||
|
return pb_1.Message.getFieldWithDefault(this, 6, false) as boolean;
|
||||||
|
}
|
||||||
|
set accEnable(value: boolean) {
|
||||||
|
pb_1.Message.setField(this, 6, value);
|
||||||
|
}
|
||||||
|
get accCheckSpeedDiff() {
|
||||||
|
return pb_1.Message.getFieldWithDefault(this, 7, "") as string;
|
||||||
|
}
|
||||||
|
set accCheckSpeedDiff(value: string) {
|
||||||
|
pb_1.Message.setField(this, 7, value);
|
||||||
|
}
|
||||||
|
get accCheckTime() {
|
||||||
|
return pb_1.Message.getFieldWithDefault(this, 8, 0) as number;
|
||||||
|
}
|
||||||
|
set accCheckTime(value: number) {
|
||||||
|
pb_1.Message.setField(this, 8, value);
|
||||||
|
}
|
||||||
static fromObject(data: {
|
static fromObject(data: {
|
||||||
speedSensorEnableA?: boolean;
|
speedSensorEnableA?: boolean;
|
||||||
speedSensorEnableB?: boolean;
|
speedSensorEnableB?: boolean;
|
||||||
radarEnable?: boolean;
|
radarEnable?: boolean;
|
||||||
radarCheckSpeedDiff?: string;
|
radarCheckSpeedDiff?: string;
|
||||||
radarCheckTime?: number;
|
radarCheckTime?: number;
|
||||||
|
accEnable?: boolean;
|
||||||
|
accCheckSpeedDiff?: string;
|
||||||
|
accCheckTime?: number;
|
||||||
}): TrainEndsStateMqtt {
|
}): TrainEndsStateMqtt {
|
||||||
const message = new TrainEndsStateMqtt({});
|
const message = new TrainEndsStateMqtt({});
|
||||||
if (data.speedSensorEnableA != null) {
|
if (data.speedSensorEnableA != null) {
|
||||||
@ -4653,6 +4732,15 @@ export namespace state {
|
|||||||
if (data.radarCheckTime != null) {
|
if (data.radarCheckTime != null) {
|
||||||
message.radarCheckTime = data.radarCheckTime;
|
message.radarCheckTime = data.radarCheckTime;
|
||||||
}
|
}
|
||||||
|
if (data.accEnable != null) {
|
||||||
|
message.accEnable = data.accEnable;
|
||||||
|
}
|
||||||
|
if (data.accCheckSpeedDiff != null) {
|
||||||
|
message.accCheckSpeedDiff = data.accCheckSpeedDiff;
|
||||||
|
}
|
||||||
|
if (data.accCheckTime != null) {
|
||||||
|
message.accCheckTime = data.accCheckTime;
|
||||||
|
}
|
||||||
return message;
|
return message;
|
||||||
}
|
}
|
||||||
toObject() {
|
toObject() {
|
||||||
@ -4662,6 +4750,9 @@ export namespace state {
|
|||||||
radarEnable?: boolean;
|
radarEnable?: boolean;
|
||||||
radarCheckSpeedDiff?: string;
|
radarCheckSpeedDiff?: string;
|
||||||
radarCheckTime?: number;
|
radarCheckTime?: number;
|
||||||
|
accEnable?: boolean;
|
||||||
|
accCheckSpeedDiff?: string;
|
||||||
|
accCheckTime?: number;
|
||||||
} = {};
|
} = {};
|
||||||
if (this.speedSensorEnableA != null) {
|
if (this.speedSensorEnableA != null) {
|
||||||
data.speedSensorEnableA = this.speedSensorEnableA;
|
data.speedSensorEnableA = this.speedSensorEnableA;
|
||||||
@ -4678,6 +4769,15 @@ export namespace state {
|
|||||||
if (this.radarCheckTime != null) {
|
if (this.radarCheckTime != null) {
|
||||||
data.radarCheckTime = this.radarCheckTime;
|
data.radarCheckTime = this.radarCheckTime;
|
||||||
}
|
}
|
||||||
|
if (this.accEnable != null) {
|
||||||
|
data.accEnable = this.accEnable;
|
||||||
|
}
|
||||||
|
if (this.accCheckSpeedDiff != null) {
|
||||||
|
data.accCheckSpeedDiff = this.accCheckSpeedDiff;
|
||||||
|
}
|
||||||
|
if (this.accCheckTime != null) {
|
||||||
|
data.accCheckTime = this.accCheckTime;
|
||||||
|
}
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
serialize(): Uint8Array;
|
serialize(): Uint8Array;
|
||||||
@ -4694,6 +4794,12 @@ export namespace state {
|
|||||||
writer.writeString(4, this.radarCheckSpeedDiff);
|
writer.writeString(4, this.radarCheckSpeedDiff);
|
||||||
if (this.radarCheckTime != 0)
|
if (this.radarCheckTime != 0)
|
||||||
writer.writeInt32(5, this.radarCheckTime);
|
writer.writeInt32(5, this.radarCheckTime);
|
||||||
|
if (this.accEnable != false)
|
||||||
|
writer.writeBool(6, this.accEnable);
|
||||||
|
if (this.accCheckSpeedDiff.length)
|
||||||
|
writer.writeString(7, this.accCheckSpeedDiff);
|
||||||
|
if (this.accCheckTime != 0)
|
||||||
|
writer.writeInt32(8, this.accCheckTime);
|
||||||
if (!w)
|
if (!w)
|
||||||
return writer.getResultBuffer();
|
return writer.getResultBuffer();
|
||||||
}
|
}
|
||||||
@ -4718,6 +4824,15 @@ export namespace state {
|
|||||||
case 5:
|
case 5:
|
||||||
message.radarCheckTime = reader.readInt32();
|
message.radarCheckTime = reader.readInt32();
|
||||||
break;
|
break;
|
||||||
|
case 6:
|
||||||
|
message.accEnable = reader.readBool();
|
||||||
|
break;
|
||||||
|
case 7:
|
||||||
|
message.accCheckSpeedDiff = reader.readString();
|
||||||
|
break;
|
||||||
|
case 8:
|
||||||
|
message.accCheckTime = reader.readInt32();
|
||||||
|
break;
|
||||||
default: reader.skipField();
|
default: reader.skipField();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user