fix: 修复一系列bug,包括热启动,前端模板,jtag; feat:修改矩阵键盘样式
This commit is contained in:
		
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@@ -1,3 +1,4 @@
 | 
			
		||||
# CommandID
 | 
			
		||||
示波器:12
 | 
			
		||||
逻辑分析仪: 11
 | 
			
		||||
Jtag: 10
 | 
			
		||||
 
 | 
			
		||||
@@ -190,11 +190,12 @@ public sealed class UDPClientPool
 | 
			
		||||
    /// <returns>是否成功</returns>
 | 
			
		||||
    public async static ValueTask<bool> SendResetSignal(IPEndPoint endPoint)
 | 
			
		||||
    {
 | 
			
		||||
        return await Task.Run(() =>
 | 
			
		||||
        return await Task.Run(async () =>
 | 
			
		||||
        {
 | 
			
		||||
            return SendAddrPack(
 | 
			
		||||
            endPoint,
 | 
			
		||||
            new WebProtocol.SendAddrPackage(BurstType.FixedBurst, 0, true, 0, 0xF0F0F0F0));
 | 
			
		||||
            var ret = SendAddrPack(endPoint,
 | 
			
		||||
                new WebProtocol.SendAddrPackage(BurstType.FixedBurst, 0, true, 0, 0xF0F0F0F0));
 | 
			
		||||
            await Task.Delay(100);
 | 
			
		||||
            return ret;
 | 
			
		||||
        });
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -18,8 +18,8 @@
 | 
			
		||||
          </feMerge>
 | 
			
		||||
        </filter>
 | 
			
		||||
        <linearGradient id="normal" gradientTransform="rotate(45 0 0)">
 | 
			
		||||
          <stop stop-color="#4b4b4b" offset="0" />
 | 
			
		||||
          <stop stop-color="#171717" offset="1" />
 | 
			
		||||
          <stop stop-color="#FFFFFF" offset="0" />
 | 
			
		||||
          <stop stop-color="#333333" offset="1" />
 | 
			
		||||
        </linearGradient>
 | 
			
		||||
        <linearGradient id="pressed" gradientTransform="rotate(45 0 0)">
 | 
			
		||||
          <stop stop-color="#171717" offset="0" />
 | 
			
		||||
@@ -42,7 +42,6 @@
 | 
			
		||||
        fill-opacity="0.9" @mousedown="toggleButtonState(true)" @mouseup="toggleButtonState(false)"
 | 
			
		||||
        @mouseleave="toggleButtonState(false)" style="
 | 
			
		||||
          pointer-events: auto;
 | 
			
		||||
          transition: all 20ms ease-in-out;
 | 
			
		||||
          cursor: pointer;
 | 
			
		||||
        " />
 | 
			
		||||
      <!-- 按键文字 - 仅显示绑定的按键 -->
 | 
			
		||||
 
 | 
			
		||||
@@ -84,7 +84,7 @@ interface Props {
 | 
			
		||||
  color?: string;
 | 
			
		||||
  enableDigitalTwin?: boolean;
 | 
			
		||||
  digitalTwinNum?: number;
 | 
			
		||||
  afterglowDuration?: number;
 | 
			
		||||
  // afterglowDuration?: number;
 | 
			
		||||
  cathodeType?: "common" | "anode";
 | 
			
		||||
  pins?: Array<{
 | 
			
		||||
    pinId: string;
 | 
			
		||||
@@ -234,24 +234,24 @@ function updateDisplayByte(newByte: number) {
 | 
			
		||||
  const oldByte = displayByte.value;
 | 
			
		||||
  displayByte.value = newByte;
 | 
			
		||||
 | 
			
		||||
  // 启动余晖效果
 | 
			
		||||
  if (oldByte !== 0 && newByte !== oldByte) {
 | 
			
		||||
    startAfterglow(oldByte);
 | 
			
		||||
  }
 | 
			
		||||
  // // 启动余晖效果
 | 
			
		||||
  // if (oldByte !== 0 && newByte !== oldByte) {
 | 
			
		||||
  //   startAfterglow(oldByte);
 | 
			
		||||
  // }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function startAfterglow(byte: number) {
 | 
			
		||||
  afterglowByte.value = byte;
 | 
			
		||||
// function startAfterglow(byte: number) {
 | 
			
		||||
//   afterglowByte.value = byte;
 | 
			
		||||
 | 
			
		||||
  if (afterglowTimer.value) {
 | 
			
		||||
    clearTimeout(afterglowTimer.value);
 | 
			
		||||
  }
 | 
			
		||||
//   if (afterglowTimer.value) {
 | 
			
		||||
//     clearTimeout(afterglowTimer.value);
 | 
			
		||||
//   }
 | 
			
		||||
 | 
			
		||||
  afterglowTimer.value = setTimeout(() => {
 | 
			
		||||
    afterglowByte.value = 0;
 | 
			
		||||
    afterglowTimer.value = null;
 | 
			
		||||
  }, props.afterglowDuration);
 | 
			
		||||
}
 | 
			
		||||
//   afterglowTimer.value = setTimeout(() => {
 | 
			
		||||
//     afterglowByte.value = 0;
 | 
			
		||||
//     afterglowTimer.value = null;
 | 
			
		||||
//   }, props.afterglowDuration);
 | 
			
		||||
// }
 | 
			
		||||
 | 
			
		||||
function cleanupDigitalTwin() {
 | 
			
		||||
  eqps.sevenSegmentDisplaySetOnOff(false);
 | 
			
		||||
@@ -395,7 +395,7 @@ export function getDefaultProps() {
 | 
			
		||||
    color: "red",
 | 
			
		||||
    enableDigitalTwin: false,
 | 
			
		||||
    digitalTwinNum: 1,
 | 
			
		||||
    afterglowDuration: 500,
 | 
			
		||||
    // afterglowDuration: 500,
 | 
			
		||||
    cathodeType: "common",
 | 
			
		||||
    pins: [
 | 
			
		||||
      { pinId: "a", constraint: "", x: 10, y: 170 },
 | 
			
		||||
 
 | 
			
		||||
@@ -48,6 +48,8 @@ export const useEquipments = defineStore("equipments", () => {
 | 
			
		||||
    1000,
 | 
			
		||||
    new Error("JtagClient Mutex Timeout!"),
 | 
			
		||||
  );
 | 
			
		||||
 | 
			
		||||
  // jtag Hub
 | 
			
		||||
  const jtagHubConnection = ref<HubConnection>();
 | 
			
		||||
  const jtagHubProxy = ref<IJtagHub>();
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user