feat: 增加示波器探测参数显示,增加旋转编码器按下的功能
This commit is contained in:
@@ -8,3 +8,9 @@ export enum RotaryEncoderDirection {
|
||||
Clockwise = 1,
|
||||
}
|
||||
|
||||
/** Transpiled from Peripherals.RotaryEncoderClient.RotaryEncoderPressStatus */
|
||||
export enum RotaryEncoderPressStatus {
|
||||
Press = 0,
|
||||
Release = 1,
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
import type { HubConnection, IStreamResult, Subject } from '@microsoft/signalr';
|
||||
import type { IDigitalTubesHub, IJtagHub, IOscilloscopeHub, IProgressHub, IRotaryEncoderHub, IWS2812Hub, IDigitalTubesReceiver, IJtagReceiver, IOscilloscopeReceiver, IProgressReceiver, IRotaryEncoderReceiver, IWS2812Receiver } from './server.Hubs';
|
||||
import type { DigitalTubeTaskStatus, OscilloscopeFullConfig, OscilloscopeDataResponse, ProgressInfo } from '../server.Hubs';
|
||||
import type { RotaryEncoderDirection } from '../Peripherals.RotaryEncoderClient';
|
||||
import type { RotaryEncoderDirection, RotaryEncoderPressStatus } from '../Peripherals.RotaryEncoderClient';
|
||||
import type { RGBColor } from '../Peripherals.WS2812Client';
|
||||
|
||||
|
||||
@@ -270,6 +270,10 @@ class IRotaryEncoderHub_HubProxy implements IRotaryEncoderHub {
|
||||
return await this.connection.invoke("RotateEncoderOnce", num, direction);
|
||||
}
|
||||
|
||||
public readonly pressEncoderOnce = async (num: number, press: RotaryEncoderPressStatus): Promise<boolean> => {
|
||||
return await this.connection.invoke("PressEncoderOnce", num, press);
|
||||
}
|
||||
|
||||
public readonly enableCycleRotateEncoder = async (num: number, direction: RotaryEncoderDirection, freq: number): Promise<boolean> => {
|
||||
return await this.connection.invoke("EnableCycleRotateEncoder", num, direction, freq);
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
// @ts-nocheck
|
||||
import type { IStreamResult, Subject } from '@microsoft/signalr';
|
||||
import type { DigitalTubeTaskStatus, OscilloscopeFullConfig, OscilloscopeDataResponse, ProgressInfo } from '../server.Hubs';
|
||||
import type { RotaryEncoderDirection } from '../Peripherals.RotaryEncoderClient';
|
||||
import type { RotaryEncoderDirection, RotaryEncoderPressStatus } from '../Peripherals.RotaryEncoderClient';
|
||||
import type { RGBColor } from '../Peripherals.WS2812Client';
|
||||
|
||||
export type IDigitalTubesHub = {
|
||||
@@ -116,6 +116,12 @@ export type IRotaryEncoderHub = {
|
||||
rotateEncoderOnce(num: number, direction: RotaryEncoderDirection): Promise<boolean>;
|
||||
/**
|
||||
* @param num Transpiled from int
|
||||
* @param press Transpiled from Peripherals.RotaryEncoderClient.RotaryEncoderPressStatus
|
||||
* @returns Transpiled from System.Threading.Tasks.Task<bool>
|
||||
*/
|
||||
pressEncoderOnce(num: number, press: RotaryEncoderPressStatus): Promise<boolean>;
|
||||
/**
|
||||
* @param num Transpiled from int
|
||||
* @param direction Transpiled from Peripherals.RotaryEncoderClient.RotaryEncoderDirection
|
||||
* @param freq Transpiled from int
|
||||
* @returns Transpiled from System.Threading.Tasks.Task<bool>
|
||||
|
||||
@@ -13,13 +13,13 @@ export type DigitalTubeTaskStatus = {
|
||||
/** Transpiled from server.Hubs.OscilloscopeDataResponse */
|
||||
export type OscilloscopeDataResponse = {
|
||||
/** Transpiled from uint */
|
||||
aDFrequency: number;
|
||||
adFrequency: number;
|
||||
/** Transpiled from byte */
|
||||
aDVpp: number;
|
||||
adVpp: number;
|
||||
/** Transpiled from byte */
|
||||
aDMax: number;
|
||||
adMax: number;
|
||||
/** Transpiled from byte */
|
||||
aDMin: number;
|
||||
adMin: number;
|
||||
/** Transpiled from string */
|
||||
waveformData: string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user