From 78f1cf038d6faa215576763bb544c3d63ad40f05 Mon Sep 17 00:00:00 2001 From: xyy <544939200@qq.com> Date: Mon, 8 Jun 2026 17:40:43 +0800 Subject: [PATCH] --- Window1.xaml.cs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Window1.xaml.cs b/Window1.xaml.cs index 1974227..9992bc6 100644 --- a/Window1.xaml.cs +++ b/Window1.xaml.cs @@ -85,8 +85,8 @@ namespace ConstantCurrentControl configCmd[4] = 0x00; // 电流高字节 (0A) configCmd[5] = 0x00; // 电流低字节 configCmd[6] = 0x01; // PC调节模式 - configCmd[7] = 1; - configCmd[8] = 0; // 开启跟踪模式 + configCmd[7] = rb50Hz.IsChecked == true ? (byte)1 : (byte)2; + configCmd[8] = 0x00; // 开启跟踪模式 configCmd[9] = 0x00; configCmd[10] = 0xFF; configCmd[11] = 0xFF; @@ -179,8 +179,8 @@ namespace ConstantCurrentControl currentCmd[4] = cmdH; currentCmd[5] = cmdL; currentCmd[6] = 0x01; // PC模式 - currentCmd[7] = 1; - currentCmd[8] = 0; // 跟踪 + currentCmd[7] = rb50Hz.IsChecked == true ? (byte)1 : (byte)2; + currentCmd[8] = 0x00; // 跟踪 currentCmd[9] = 0x00; currentCmd[10] = 0xFF; currentCmd[11] = 0xFF; @@ -201,8 +201,8 @@ namespace ConstantCurrentControl stopCmd[4] = 0x00; stopCmd[5] = 0x00; stopCmd[6] = 0x01; - stopCmd[7] = 1; // 50Hz - stopCmd[8] = 0; + stopCmd[7] = rb50Hz.IsChecked == true ? (byte)1 : (byte)2; + stopCmd[8] = 0x00; stopCmd[9] = 0x00; stopCmd[10] = 0xFF; stopCmd[11] = 0xFF; @@ -220,4 +220,5 @@ namespace ConstantCurrentControl } } } + #endregion \ No newline at end of file