diff --git a/src/stores/debugStore.ts b/src/stores/debugStore.ts index 488b91d..696c639 100644 --- a/src/stores/debugStore.ts +++ b/src/stores/debugStore.ts @@ -31,6 +31,7 @@ export const useDebugStore = defineStore('debug', { heatMotorData: { distance: undefined, velocity: undefined, + times: undefined, }, heatTemperature: { temperature: undefined, @@ -45,21 +46,28 @@ export const useDebugStore = defineStore('debug', { xMotorData: { xDimDistance: undefined, xDimVelocity: undefined, + times: undefined, + direction: 'backward', }, // y轴 yMotorData: { yDimDistance: undefined, yDimVelocity: undefined, + times: undefined, + direction: 'backward', }, // z轴 zMotorData: { zDimDistance: undefined, zDimVelocity: undefined, + times: undefined, + direction: 'forward', }, // 夹爪 JawData: { velocity: undefined, distance: undefined, + times: undefined, }, }, // 拍子模组 diff --git a/src/types/debug.d.ts b/src/types/debug.d.ts index fdcf474..5ab31c4 100644 --- a/src/types/debug.d.ts +++ b/src/types/debug.d.ts @@ -31,6 +31,7 @@ declare namespace Debug { interface HeatMotorData { distance: number | undefined velocity: number | undefined + times: number | undefined } interface HeatTemperature { @@ -50,21 +51,28 @@ declare namespace Debug { interface XMotorData { xDimDistance: number | undefined xDimVelocity: number | undefined + times: number | undefined + direction: 'forward' | 'backward' } interface YMotorData { yDimDistance: number | undefined yDimVelocity: number | undefined + times: number | undefined + direction: 'forward' | 'backward' } interface ZMotorData { zDimDistance: number | undefined zDimVelocity: number | undefined + times: number | undefined + direction: 'forward' | 'backward' } interface JawData { velocity: number | undefined distance: number | undefined + times: number | undefined } interface TransferModule { diff --git a/src/views/debug/index.vue b/src/views/debug/index.vue index b5d3538..d5efc60 100644 --- a/src/views/debug/index.vue +++ b/src/views/debug/index.vue @@ -335,6 +335,7 @@ const debug_shaker_stop = async () => { } const debug_transportation_arm_reset = async (motor: 'x' | 'y' | 'z') => { + console.log(debugStore.formData.transferModule[`${motor}MotorData`]) currentCommandId = Date.now().toString() const params = { commandId: currentCommandId, @@ -346,13 +347,14 @@ const debug_transportation_arm_reset = async (motor: 'x' | 'y' | 'z') => { await debugStore.sendControl(params) } -const debug_transportation_arm_move = async (motor: 'x' | 'y' | 'z') => { +const debug_transportation_arm_move = async (motor: 'x' | 'y' | 'z', direction: 'forward' | 'backward') => { currentCommandId = Date.now().toString() const params = { commandId: currentCommandId, command: 'debug_transportation_arm_move', params: { ...debugStore.formData.transferModule[`${motor}MotorData`], + [`${motor}DimDistance`]: direction === 'backward' ? -debugStore.formData.transferModule[`${motor}MotorData`][`${motor}DimDistance`] : debugStore.formData.transferModule[`${motor}MotorData`][`${motor}DimDistance`], }, } await debugStore.sendControl(params) @@ -462,16 +464,26 @@ const debug_door_stop = async () => { + + + + 次 + + + - - 回原点 + + 前进 - - 开始 + + 后退 停止 + + 回原点 + @@ -492,16 +504,26 @@ const debug_door_stop = async () => { + + + + 次 + + + - - 回原点 + + 前进 - - 开始 + + 后退 停止 + + 回原点 + @@ -522,16 +544,26 @@ const debug_door_stop = async () => { + + + + 次 + + + - - 回原点 + + 前进 - - 开始 + + 后退 停止 + + 回原点 + @@ -552,6 +584,13 @@ const debug_door_stop = async () => { + + + + 次 + + + 打开 @@ -566,24 +605,6 @@ const debug_door_stop = async () => { - - - - 门 - - - - - 开门 - - - 关门 - - - 停止 - - - @@ -745,6 +766,24 @@ const debug_door_stop = async () => { + + + + 门 + + + + + 开门 + + + 关门 + + + 停止 + + + @@ -775,6 +814,13 @@ const debug_door_stop = async () => { + + + + 次 + + + 上升 @@ -958,4 +1004,9 @@ const debug_door_stop = async () => { :deep(.el-card__body) { padding: 10px; } +.el-form-item__content { + .ft-button { + margin-bottom: 10px; + } +}