Merge remote-tracking branch 'origin/develop' into local-test
All checks were successful
CI / Docker-Build (push) Successful in 2m41s

This commit is contained in:
joylink_fanyuhong 2024-08-30 17:28:19 +08:00
commit 633c07037b
6 changed files with 191 additions and 2 deletions

@ -1 +1 @@
Subproject commit 67d7d79c5a50880b61be05d98184209422f15f1b Subproject commit 7629f290ea612d4ce368c40d4cf793dffc4b21ec

View File

@ -60,6 +60,7 @@ export interface TrainCreateParams {
train_max_speed: number; train_max_speed: number;
train_max_acc: number; train_max_acc: number;
train_max_brake: number; train_max_brake: number;
train_emergency_brake: number;
trainConfigData?: TrainConfigData; trainConfigData?: TrainConfigData;
trainControlMapId: number; trainControlMapId: number;
} }

View File

@ -175,6 +175,7 @@ function onCreate() {
trainMaxSpeed: trainConfig.value.train_max_speed, trainMaxSpeed: trainConfig.value.train_max_speed,
trainMaxAcc: trainConfig.value.train_max_acc, trainMaxAcc: trainConfig.value.train_max_acc,
trainMaxBrake: trainConfig.value.train_max_brake, trainMaxBrake: trainConfig.value.train_max_brake,
trainEmergencyBrake: trainConfig.value.train_emergency_brake,
configTrain: trainConfig.value.trainConfigData as TrainConfigData, configTrain: trainConfig.value.trainConfigData as TrainConfigData,
trainControlMapId: trainConfig.value.trainControlMapId, trainControlMapId: trainConfig.value.trainControlMapId,
trainEndsA: { trainEndsA: {
@ -226,6 +227,7 @@ const trainConfig = ref<TrainConfigItem | null>({
train_max_speed: 0, train_max_speed: 0,
train_max_acc: 0, train_max_acc: 0,
train_max_brake: 0, train_max_brake: 0,
train_emergency_brake: 0,
trainControlMapId: 0, trainControlMapId: 0,
}); });
function setConfigVal(val: TrainConfigItem | null) { function setConfigVal(val: TrainConfigItem | null) {

View File

@ -194,7 +194,15 @@
<q-input <q-input
outlined outlined
v-model.number="editInfo.train_max_brake" v-model.number="editInfo.train_max_brake"
label="最大减速度(m/s²)" label="常用最大减速度(m/s²)"
hint=""
/>
</div>
<div class="col-4 q-px-sm">
<q-input
outlined
v-model.number="editInfo.train_emergency_brake"
label="紧急制动减速度(m/s²)"
hint="" hint=""
/> />
</div> </div>
@ -563,6 +571,7 @@ function onCreate() {
train_max_speed: editInfo.train_max_speed, train_max_speed: editInfo.train_max_speed,
train_max_acc: editInfo.train_max_acc, train_max_acc: editInfo.train_max_acc,
train_max_brake: editInfo.train_max_brake, train_max_brake: editInfo.train_max_brake,
train_emergency_brake: editInfo.train_emergency_brake,
trainConfigData: editInfo.trainConfigData, trainConfigData: editInfo.trainConfigData,
trainControlMapId: editInfo.trainControlMapId, trainControlMapId: editInfo.trainControlMapId,
}; };
@ -598,6 +607,7 @@ function onReset() {
editInfo.train_max_speed = 0; editInfo.train_max_speed = 0;
editInfo.train_max_acc = 0; editInfo.train_max_acc = 0;
editInfo.train_max_brake = 0; editInfo.train_max_brake = 0;
editInfo.train_emergency_brake = 0;
// editInfo.min_diameter = 0; // editInfo.min_diameter = 0;
// editInfo.max_diameter = 0; // editInfo.max_diameter = 0;
editInfo.train_sets = ''; editInfo.train_sets = '';
@ -660,6 +670,7 @@ interface EditCreateItem extends TrainCreateParams {
train_max_speed: number; train_max_speed: number;
train_max_acc: number; train_max_acc: number;
train_max_brake: number; train_max_brake: number;
train_emergency_brake: number;
trainControlMapId: number; trainControlMapId: number;
trainConfigData: { trainConfigData: {
davisParamA: number; davisParamA: number;
@ -696,6 +707,7 @@ const editInfo = reactive<EditCreateItem>({
train_max_speed: 0, train_max_speed: 0,
train_max_acc: 0, train_max_acc: 0,
train_max_brake: 0, train_max_brake: 0,
train_emergency_brake: 0,
trainControlMapId: 0, trainControlMapId: 0,
trainConfigData: { trainConfigData: {
davisParamA: 2.25, davisParamA: 2.25,
@ -730,6 +742,7 @@ function editData(row: TrainItem) {
editInfo.train_max_speed = res.train_max_speed; editInfo.train_max_speed = res.train_max_speed;
editInfo.train_max_acc = res.train_max_acc; editInfo.train_max_acc = res.train_max_acc;
editInfo.train_max_brake = res.train_max_brake; editInfo.train_max_brake = res.train_max_brake;
editInfo.train_emergency_brake = res.train_emergency_brake;
// editInfo.min_diameter = res.min_diameter; // editInfo.min_diameter = res.min_diameter;
// editInfo.max_diameter = res.max_diameter; // editInfo.max_diameter = res.max_diameter;
editInfo.train_sets = res.train_sets; editInfo.train_sets = res.train_sets;

View File

@ -1281,6 +1281,11 @@ export namespace state {
oldLink?: string; oldLink?: string;
oldLinkOffset?: number; oldLinkOffset?: number;
btmBaliseCache?: TrainBtmCache; btmBaliseCache?: TrainBtmCache;
TrainLoad?: number;
TrainMaxSpeed?: number;
TrainMaxAcc?: number;
TrainMaxBrake?: number;
TrainEmergencyBrake?: 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);
@ -1375,6 +1380,21 @@ export namespace state {
if ("btmBaliseCache" in data && data.btmBaliseCache != undefined) { if ("btmBaliseCache" in data && data.btmBaliseCache != undefined) {
this.btmBaliseCache = data.btmBaliseCache; this.btmBaliseCache = data.btmBaliseCache;
} }
if ("TrainLoad" in data && data.TrainLoad != undefined) {
this.TrainLoad = data.TrainLoad;
}
if ("TrainMaxSpeed" in data && data.TrainMaxSpeed != undefined) {
this.TrainMaxSpeed = data.TrainMaxSpeed;
}
if ("TrainMaxAcc" in data && data.TrainMaxAcc != undefined) {
this.TrainMaxAcc = data.TrainMaxAcc;
}
if ("TrainMaxBrake" in data && data.TrainMaxBrake != undefined) {
this.TrainMaxBrake = data.TrainMaxBrake;
}
if ("TrainEmergencyBrake" in data && data.TrainEmergencyBrake != undefined) {
this.TrainEmergencyBrake = data.TrainEmergencyBrake;
}
} }
} }
get id() { get id() {
@ -1590,6 +1610,36 @@ export namespace state {
get has_btmBaliseCache() { get has_btmBaliseCache() {
return pb_1.Message.getField(this, 30) != null; return pb_1.Message.getField(this, 30) != null;
} }
get TrainLoad() {
return pb_1.Message.getFieldWithDefault(this, 31, 0) as number;
}
set TrainLoad(value: number) {
pb_1.Message.setField(this, 31, value);
}
get TrainMaxSpeed() {
return pb_1.Message.getFieldWithDefault(this, 32, 0) as number;
}
set TrainMaxSpeed(value: number) {
pb_1.Message.setField(this, 32, value);
}
get TrainMaxAcc() {
return pb_1.Message.getFieldWithDefault(this, 33, 0) as number;
}
set TrainMaxAcc(value: number) {
pb_1.Message.setField(this, 33, value);
}
get TrainMaxBrake() {
return pb_1.Message.getFieldWithDefault(this, 34, 0) as number;
}
set TrainMaxBrake(value: number) {
pb_1.Message.setField(this, 34, value);
}
get TrainEmergencyBrake() {
return pb_1.Message.getFieldWithDefault(this, 35, 0) as number;
}
set TrainEmergencyBrake(value: number) {
pb_1.Message.setField(this, 35, value);
}
static fromObject(data: { static fromObject(data: {
id?: string; id?: string;
up?: boolean; up?: boolean;
@ -1621,6 +1671,11 @@ export namespace state {
oldLink?: string; oldLink?: string;
oldLinkOffset?: number; oldLinkOffset?: number;
btmBaliseCache?: ReturnType<typeof TrainBtmCache.prototype.toObject>; btmBaliseCache?: ReturnType<typeof TrainBtmCache.prototype.toObject>;
TrainLoad?: number;
TrainMaxSpeed?: number;
TrainMaxAcc?: number;
TrainMaxBrake?: number;
TrainEmergencyBrake?: number;
}): TrainState { }): TrainState {
const message = new TrainState({}); const message = new TrainState({});
if (data.id != null) { if (data.id != null) {
@ -1713,6 +1768,21 @@ export namespace state {
if (data.btmBaliseCache != null) { if (data.btmBaliseCache != null) {
message.btmBaliseCache = TrainBtmCache.fromObject(data.btmBaliseCache); message.btmBaliseCache = TrainBtmCache.fromObject(data.btmBaliseCache);
} }
if (data.TrainLoad != null) {
message.TrainLoad = data.TrainLoad;
}
if (data.TrainMaxSpeed != null) {
message.TrainMaxSpeed = data.TrainMaxSpeed;
}
if (data.TrainMaxAcc != null) {
message.TrainMaxAcc = data.TrainMaxAcc;
}
if (data.TrainMaxBrake != null) {
message.TrainMaxBrake = data.TrainMaxBrake;
}
if (data.TrainEmergencyBrake != null) {
message.TrainEmergencyBrake = data.TrainEmergencyBrake;
}
return message; return message;
} }
toObject() { toObject() {
@ -1747,6 +1817,11 @@ export namespace state {
oldLink?: string; oldLink?: string;
oldLinkOffset?: number; oldLinkOffset?: number;
btmBaliseCache?: ReturnType<typeof TrainBtmCache.prototype.toObject>; btmBaliseCache?: ReturnType<typeof TrainBtmCache.prototype.toObject>;
TrainLoad?: number;
TrainMaxSpeed?: number;
TrainMaxAcc?: number;
TrainMaxBrake?: number;
TrainEmergencyBrake?: number;
} = {}; } = {};
if (this.id != null) { if (this.id != null) {
data.id = this.id; data.id = this.id;
@ -1838,6 +1913,21 @@ export namespace state {
if (this.btmBaliseCache != null) { if (this.btmBaliseCache != null) {
data.btmBaliseCache = this.btmBaliseCache.toObject(); data.btmBaliseCache = this.btmBaliseCache.toObject();
} }
if (this.TrainLoad != null) {
data.TrainLoad = this.TrainLoad;
}
if (this.TrainMaxSpeed != null) {
data.TrainMaxSpeed = this.TrainMaxSpeed;
}
if (this.TrainMaxAcc != null) {
data.TrainMaxAcc = this.TrainMaxAcc;
}
if (this.TrainMaxBrake != null) {
data.TrainMaxBrake = this.TrainMaxBrake;
}
if (this.TrainEmergencyBrake != null) {
data.TrainEmergencyBrake = this.TrainEmergencyBrake;
}
return data; return data;
} }
serialize(): Uint8Array; serialize(): Uint8Array;
@ -1904,6 +1994,16 @@ export namespace state {
writer.writeInt64(29, this.oldLinkOffset); writer.writeInt64(29, this.oldLinkOffset);
if (this.has_btmBaliseCache) if (this.has_btmBaliseCache)
writer.writeMessage(30, this.btmBaliseCache, () => this.btmBaliseCache.serialize(writer)); writer.writeMessage(30, this.btmBaliseCache, () => this.btmBaliseCache.serialize(writer));
if (this.TrainLoad != 0)
writer.writeInt32(31, this.TrainLoad);
if (this.TrainMaxSpeed != 0)
writer.writeFloat(32, this.TrainMaxSpeed);
if (this.TrainMaxAcc != 0)
writer.writeFloat(33, this.TrainMaxAcc);
if (this.TrainMaxBrake != 0)
writer.writeFloat(34, this.TrainMaxBrake);
if (this.TrainEmergencyBrake != 0)
writer.writeFloat(35, this.TrainEmergencyBrake);
if (!w) if (!w)
return writer.getResultBuffer(); return writer.getResultBuffer();
} }
@ -2003,6 +2103,21 @@ export namespace state {
case 30: case 30:
reader.readMessage(message.btmBaliseCache, () => message.btmBaliseCache = TrainBtmCache.deserialize(reader)); reader.readMessage(message.btmBaliseCache, () => message.btmBaliseCache = TrainBtmCache.deserialize(reader));
break; break;
case 31:
message.TrainLoad = reader.readInt32();
break;
case 32:
message.TrainMaxSpeed = reader.readFloat();
break;
case 33:
message.TrainMaxAcc = reader.readFloat();
break;
case 34:
message.TrainMaxBrake = reader.readFloat();
break;
case 35:
message.TrainEmergencyBrake = reader.readFloat();
break;
default: reader.skipField(); default: reader.skipField();
} }
} }
@ -3390,6 +3505,7 @@ export namespace state {
trainConnInitComplate?: boolean; trainConnInitComplate?: boolean;
atoCloseRightDoor?: boolean; atoCloseRightDoor?: boolean;
lightAtoSend?: boolean; lightAtoSend?: boolean;
atoStepLevel?: TrainVobcState.AtoStepLevel;
}) { }) {
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);
@ -3634,6 +3750,9 @@ export namespace state {
if ("lightAtoSend" in data && data.lightAtoSend != undefined) { if ("lightAtoSend" in data && data.lightAtoSend != undefined) {
this.lightAtoSend = data.lightAtoSend; this.lightAtoSend = data.lightAtoSend;
} }
if ("atoStepLevel" in data && data.atoStepLevel != undefined) {
this.atoStepLevel = data.atoStepLevel;
}
} }
} }
get lifeSignal() { get lifeSignal() {
@ -4116,6 +4235,12 @@ export namespace state {
set lightAtoSend(value: boolean) { set lightAtoSend(value: boolean) {
pb_1.Message.setField(this, 84, value); pb_1.Message.setField(this, 84, value);
} }
get atoStepLevel() {
return pb_1.Message.getFieldWithDefault(this, 85, TrainVobcState.AtoStepLevel.ATO_STEP_LEVEL_NONE) as TrainVobcState.AtoStepLevel;
}
set atoStepLevel(value: TrainVobcState.AtoStepLevel) {
pb_1.Message.setField(this, 85, value);
}
static fromObject(data: { static fromObject(data: {
lifeSignal?: number; lifeSignal?: number;
tc1Active?: boolean; tc1Active?: boolean;
@ -4197,6 +4322,7 @@ export namespace state {
trainConnInitComplate?: boolean; trainConnInitComplate?: boolean;
atoCloseRightDoor?: boolean; atoCloseRightDoor?: boolean;
lightAtoSend?: boolean; lightAtoSend?: boolean;
atoStepLevel?: TrainVobcState.AtoStepLevel;
}): TrainVobcState { }): TrainVobcState {
const message = new TrainVobcState({}); const message = new TrainVobcState({});
if (data.lifeSignal != null) { if (data.lifeSignal != null) {
@ -4439,6 +4565,9 @@ export namespace state {
if (data.lightAtoSend != null) { if (data.lightAtoSend != null) {
message.lightAtoSend = data.lightAtoSend; message.lightAtoSend = data.lightAtoSend;
} }
if (data.atoStepLevel != null) {
message.atoStepLevel = data.atoStepLevel;
}
return message; return message;
} }
toObject() { toObject() {
@ -4523,6 +4652,7 @@ export namespace state {
trainConnInitComplate?: boolean; trainConnInitComplate?: boolean;
atoCloseRightDoor?: boolean; atoCloseRightDoor?: boolean;
lightAtoSend?: boolean; lightAtoSend?: boolean;
atoStepLevel?: TrainVobcState.AtoStepLevel;
} = {}; } = {};
if (this.lifeSignal != null) { if (this.lifeSignal != null) {
data.lifeSignal = this.lifeSignal; data.lifeSignal = this.lifeSignal;
@ -4764,6 +4894,9 @@ export namespace state {
if (this.lightAtoSend != null) { if (this.lightAtoSend != null) {
data.lightAtoSend = this.lightAtoSend; data.lightAtoSend = this.lightAtoSend;
} }
if (this.atoStepLevel != null) {
data.atoStepLevel = this.atoStepLevel;
}
return data; return data;
} }
serialize(): Uint8Array; serialize(): Uint8Array;
@ -4930,6 +5063,8 @@ export namespace state {
writer.writeBool(83, this.atoCloseRightDoor); writer.writeBool(83, this.atoCloseRightDoor);
if (this.lightAtoSend != false) if (this.lightAtoSend != false)
writer.writeBool(84, this.lightAtoSend); writer.writeBool(84, this.lightAtoSend);
if (this.atoStepLevel != TrainVobcState.AtoStepLevel.ATO_STEP_LEVEL_NONE)
writer.writeEnum(85, this.atoStepLevel);
if (!w) if (!w)
return writer.getResultBuffer(); return writer.getResultBuffer();
} }
@ -5179,6 +5314,9 @@ export namespace state {
case 84: case 84:
message.lightAtoSend = reader.readBool(); message.lightAtoSend = reader.readBool();
break; break;
case 85:
message.atoStepLevel = reader.readEnum();
break;
default: reader.skipField(); default: reader.skipField();
} }
} }
@ -5191,6 +5329,18 @@ export namespace state {
return TrainVobcState.deserialize(bytes); return TrainVobcState.deserialize(bytes);
} }
} }
export namespace TrainVobcState {
export enum AtoStepLevel {
ATO_STEP_LEVEL_NONE = 0,
ATO_STEP_LEVEL_1 = 1,
ATO_STEP_LEVEL_2 = 2,
ATO_STEP_LEVEL_3 = 3,
ATO_STEP_LEVEL_4 = 4,
ATO_STEP_LEVEL_5 = 5,
ATO_STEP_LEVEL_6 = 6,
ATO_STEP_LEVEL_7 = 7
}
}
export class TrainMapState extends pb_1.Message { export class TrainMapState extends pb_1.Message {
#one_of_decls: number[][] = []; #one_of_decls: number[][] = [];
constructor(data?: any[] | { constructor(data?: any[] | {

View File

@ -9088,6 +9088,7 @@ export namespace graphicData {
trainMaxSpeed?: number; trainMaxSpeed?: number;
trainMaxAcc?: number; trainMaxAcc?: number;
trainMaxBrake?: number; trainMaxBrake?: number;
TrainEmergencyBrake?: 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);
@ -9122,6 +9123,9 @@ export namespace graphicData {
if ("trainMaxBrake" in data && data.trainMaxBrake != undefined) { if ("trainMaxBrake" in data && data.trainMaxBrake != undefined) {
this.trainMaxBrake = data.trainMaxBrake; this.trainMaxBrake = data.trainMaxBrake;
} }
if ("TrainEmergencyBrake" in data && data.TrainEmergencyBrake != undefined) {
this.TrainEmergencyBrake = data.TrainEmergencyBrake;
}
} }
} }
get trainModel() { get trainModel() {
@ -9187,6 +9191,12 @@ export namespace graphicData {
set trainMaxBrake(value: number) { set trainMaxBrake(value: number) {
pb_1.Message.setField(this, 13, value); pb_1.Message.setField(this, 13, value);
} }
get TrainEmergencyBrake() {
return pb_1.Message.getFieldWithDefault(this, 14, 0) as number;
}
set TrainEmergencyBrake(value: number) {
pb_1.Message.setField(this, 14, value);
}
static fromObject(data: { static fromObject(data: {
trainModel?: Train.TrainModel; trainModel?: Train.TrainModel;
carriageLength?: number; carriageLength?: number;
@ -9198,6 +9208,7 @@ export namespace graphicData {
trainMaxSpeed?: number; trainMaxSpeed?: number;
trainMaxAcc?: number; trainMaxAcc?: number;
trainMaxBrake?: number; trainMaxBrake?: number;
TrainEmergencyBrake?: number;
}): Train { }): Train {
const message = new Train({}); const message = new Train({});
if (data.trainModel != null) { if (data.trainModel != null) {
@ -9230,6 +9241,9 @@ export namespace graphicData {
if (data.trainMaxBrake != null) { if (data.trainMaxBrake != null) {
message.trainMaxBrake = data.trainMaxBrake; message.trainMaxBrake = data.trainMaxBrake;
} }
if (data.TrainEmergencyBrake != null) {
message.TrainEmergencyBrake = data.TrainEmergencyBrake;
}
return message; return message;
} }
toObject() { toObject() {
@ -9244,6 +9258,7 @@ export namespace graphicData {
trainMaxSpeed?: number; trainMaxSpeed?: number;
trainMaxAcc?: number; trainMaxAcc?: number;
trainMaxBrake?: number; trainMaxBrake?: number;
TrainEmergencyBrake?: number;
} = {}; } = {};
if (this.trainModel != null) { if (this.trainModel != null) {
data.trainModel = this.trainModel; data.trainModel = this.trainModel;
@ -9275,6 +9290,9 @@ export namespace graphicData {
if (this.trainMaxBrake != null) { if (this.trainMaxBrake != null) {
data.trainMaxBrake = this.trainMaxBrake; data.trainMaxBrake = this.trainMaxBrake;
} }
if (this.TrainEmergencyBrake != null) {
data.TrainEmergencyBrake = this.TrainEmergencyBrake;
}
return data; return data;
} }
serialize(): Uint8Array; serialize(): Uint8Array;
@ -9301,6 +9319,8 @@ export namespace graphicData {
writer.writeFloat(12, this.trainMaxAcc); writer.writeFloat(12, this.trainMaxAcc);
if (this.trainMaxBrake != 0) if (this.trainMaxBrake != 0)
writer.writeFloat(13, this.trainMaxBrake); writer.writeFloat(13, this.trainMaxBrake);
if (this.TrainEmergencyBrake != 0)
writer.writeFloat(14, this.TrainEmergencyBrake);
if (!w) if (!w)
return writer.getResultBuffer(); return writer.getResultBuffer();
} }
@ -9340,6 +9360,9 @@ export namespace graphicData {
case 13: case 13:
message.trainMaxBrake = reader.readFloat(); message.trainMaxBrake = reader.readFloat();
break; break;
case 14:
message.TrainEmergencyBrake = reader.readFloat();
break;
default: reader.skipField(); default: reader.skipField();
} }
} }