feat: 增加示波器探测参数显示,增加旋转编码器按下的功能
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
import { AuthManager } from "@/utils/AuthManager";
|
||||
import type { RotaryEncoderDirection } from "@/utils/signalR/Peripherals.RotaryEncoderClient";
|
||||
import type {
|
||||
RotaryEncoderDirection,
|
||||
RotaryEncoderPressStatus,
|
||||
} from "@/utils/signalR/Peripherals.RotaryEncoderClient";
|
||||
import {
|
||||
getHubProxyFactory,
|
||||
getReceiverRegister,
|
||||
@@ -72,6 +75,11 @@ export const useRotaryEncoder = defineStore("RotaryEncoder", () => {
|
||||
return await proxy.rotateEncoderOnce(num, direction);
|
||||
}
|
||||
|
||||
async function pressOnce(num: number, pressStatus: RotaryEncoderPressStatus) {
|
||||
const proxy = getHubProxy();
|
||||
return await proxy.pressEncoderOnce(num, pressStatus);
|
||||
}
|
||||
|
||||
async function enableCycleRotate(
|
||||
num: number,
|
||||
direction: RotaryEncoderDirection,
|
||||
@@ -89,6 +97,7 @@ export const useRotaryEncoder = defineStore("RotaryEncoder", () => {
|
||||
return {
|
||||
setEnable,
|
||||
rotateOnce,
|
||||
pressOnce,
|
||||
enableCycleRotate,
|
||||
disableCycleRotate,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user