Now working
This commit is contained in:
@@ -3,8 +3,12 @@
|
||||
<h1>Quibot Motor Control</h1>
|
||||
|
||||
<div class="actions">
|
||||
<button :disabled="pending" @click="callMotor('step')">
|
||||
{{ pending && action === 'step' ? 'Starting...' : 'Step' }}
|
||||
<button :disabled="pending" @click="callMotor('step/forward')">
|
||||
{{ pending && action === 'step/forward' ? 'Starting...' : 'Step Forward' }}
|
||||
</button>
|
||||
|
||||
<button :disabled="pending" @click="callMotor('step/backwards')">
|
||||
{{ pending && action === 'step/backwards' ? 'Starting...' : 'Step Backwards' }}
|
||||
</button>
|
||||
|
||||
<button :disabled="pending" class="stop" @click="callMotor('stop')">
|
||||
@@ -25,7 +29,7 @@
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
|
||||
type MotorAction = 'step' | 'stop'
|
||||
type MotorAction = 'step/forward' | 'step/backwards' | 'stop'
|
||||
|
||||
const pending = ref(false)
|
||||
const action = ref<MotorAction | null>(null)
|
||||
|
||||
Reference in New Issue
Block a user