From 7e2d97b4a30b4f2d5a41495ce7525b9e74078309 Mon Sep 17 00:00:00 2001
From: tcfshcrw <48719709+tcfshcrw@users.noreply.github.com>
Date: Thu, 18 Jul 2024 19:05:11 +0800
Subject: [PATCH] Bug fix
1. fix UI bug
2. change the custom slider length to 300.
---
SimHubPlugin/SettingsControlDemo.xaml | 48 +++++++++++------------
SimHubPlugin/SettingsControlDemo.xaml.cs | 8 ++--
SimHubPlugin/bin/DiyActivePedal.dll | Bin 188928 -> 188928 bytes
3 files changed, 28 insertions(+), 28 deletions(-)
diff --git a/SimHubPlugin/SettingsControlDemo.xaml b/SimHubPlugin/SettingsControlDemo.xaml
index 056a83cc..4b042991 100644
--- a/SimHubPlugin/SettingsControlDemo.xaml
+++ b/SimHubPlugin/SettingsControlDemo.xaml
@@ -1583,33 +1583,33 @@
-
+
-
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
@@ -1622,33 +1622,33 @@
-
+
-
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
diff --git a/SimHubPlugin/SettingsControlDemo.xaml.cs b/SimHubPlugin/SettingsControlDemo.xaml.cs
index f032f2d5..5f26f7ef 100644
--- a/SimHubPlugin/SettingsControlDemo.xaml.cs
+++ b/SimHubPlugin/SettingsControlDemo.xaml.cs
@@ -1049,10 +1049,10 @@ public void updateTheGuiFromConfig()
checkbox_enable_CV2.IsChecked = false;
}
Slider_CV1_trigger.Value = Plugin.Settings.CV1_trigger[indexOfSelectedPedal_u];
- Slider_CV1_AMP.Value = dap_config_st[indexOfSelectedPedal_u].payloadPedalConfig_.CV_amp_1;
+ Slider_CV1_AMP.Value = (float)dap_config_st[indexOfSelectedPedal_u].payloadPedalConfig_.CV_amp_1/20.0f;
Slider_CV1_freq.Value = dap_config_st[indexOfSelectedPedal_u].payloadPedalConfig_.CV_freq_1;
Slider_CV2_trigger.Value = Plugin.Settings.CV2_trigger[indexOfSelectedPedal_u];
- Slider_CV2_AMP.Value = dap_config_st[indexOfSelectedPedal_u].payloadPedalConfig_.CV_amp_2;
+ Slider_CV2_AMP.Value = (float)dap_config_st[indexOfSelectedPedal_u].payloadPedalConfig_.CV_amp_2/20.0f;
Slider_CV2_freq.Value = dap_config_st[indexOfSelectedPedal_u].payloadPedalConfig_.CV_freq_2;
label_CV1_trigger.Content = "Effect Trigger:" + Plugin.Settings.CV1_trigger[indexOfSelectedPedal_u];
label_CV1_AMP.Content = "Effect Amplitude:" + (float)dap_config_st[indexOfSelectedPedal_u].payloadPedalConfig_.CV_amp_1/20.0f + "kg";
@@ -5453,12 +5453,12 @@ private void Slider_CV1_freq_ValueChanged(object sender, RoutedPropertyChangedEv
private void checkbox_enable_CV2_Checked(object sender, RoutedEventArgs e)
{
- Plugin.Settings.CV1_enable_flag[indexOfSelectedPedal_u] = true;
+ Plugin.Settings.CV2_enable_flag[indexOfSelectedPedal_u] = true;
}
private void checkbox_enable_CV2_Unchecked(object sender, RoutedEventArgs e)
{
- Plugin.Settings.CV1_enable_flag[indexOfSelectedPedal_u] = false;
+ Plugin.Settings.CV2_enable_flag[indexOfSelectedPedal_u] = false;
}
private void Bind_CV2_Click(object sender, RoutedEventArgs e)
diff --git a/SimHubPlugin/bin/DiyActivePedal.dll b/SimHubPlugin/bin/DiyActivePedal.dll
index 319bf57f2977e55d9b73819dfc6436462a4f1d35..a40825e72d97e478c8f0a269856a5094199e355b 100644
GIT binary patch
delta 3457
zcmZwK2~?EV6$kKpABq%t1Pz-@JV@BIB;tBRIY=rh-~uWNSWXU;QiO(}Ml=|x!w4Nw
zM}&-FIH_7fmSfQxBb*FXi>SC1F>cMG;D&2lqEQG!#@PFP?~*1xnRDRG@B82P?tAks
z424bo3!D0vm59fkvC+uREx)S809
zSZOt(F*upZwO0)N2*KKua5f-w@P>ji^l!{~3>`YXc`1xS_YTI{KhB
z@@l`|WG~qR;41R}X*En5Y&B1tWA&KvzoUn>qqSYrx&}i!Kn12XNsH(*}BY7
zHQFGjK~SNVnZea7O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