Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop #32

Merged
merged 80 commits into from
Jul 12, 2024
Merged
Changes from 1 commit
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
9e5f498
remove the test slider in license tab
tcfshcrw Apr 26, 2024
7219f8f
Added delay in serial communication task since otherwise ESP32 S3 sto…
ChrGri Apr 27, 2024
0405d0f
Remove force range slider to be pedal specific, since it resulted in …
ChrGri Apr 27, 2024
73a15c8
fix the bug that slider maximun change problem
tcfshcrw Apr 27, 2024
935a554
bug fix for I2C scan and MPC4725 module
tcfshcrw Apr 28, 2024
dd17c52
Added PlatformIO project
ChrGri Apr 30, 2024
35013f3
Switched from byte to uint8
ChrGri Apr 30, 2024
6bef42b
Switched from byte to uint8 - part 2
ChrGri Apr 30, 2024
a256ce9
fix a bug that effect naming in vscode
tcfshcrw Apr 30, 2024
d5902a3
Update platformio.ini
ChrGri Apr 30, 2024
2313d35
Common platformio.ini section
ChrGri Apr 30, 2024
64f7ce2
update platformio.ini
tcfshcrw Apr 30, 2024
037ee17
Update platformio.ini
tcfshcrw Apr 30, 2024
cddcb7e
Rudder first implement
tcfshcrw May 1, 2024
283804d
Revert "Rudder first implement"
tcfshcrw May 1, 2024
8c4f61e
combine axis for vjoy
tcfshcrw May 1, 2024
fde750f
More robust USB output
ChrGri May 1, 2024
bc41722
Added serial joystick test project
ChrGri May 2, 2024
768abe7
Disable USB MSC
ChrGri May 3, 2024
eb98cd4
Add serial monitor baudrate into platfromio.ini
tcfshcrw May 3, 2024
a99ca3f
Enable reboot flag added
ChrGri May 3, 2024
5170072
add speedcrafter PCB env
tcfshcrw May 4, 2024
c5093d5
add PCB version 7 for ESP32 S3 serial chip out
tcfshcrw May 5, 2024
3011ce4
Clear serial write errors
ChrGri May 5, 2024
39bd3ba
Merge branch 'develop' of https://github.com/ChrGri/DIY-Sim-Racing-FF…
ChrGri May 5, 2024
6f6af7a
Serial joystick test stable output
ChrGri May 6, 2024
70269aa
Reliable CDC and HID output from ESP32 S3
ChrGri May 6, 2024
62b8afc
Add RTS/DTR checkbox, make reboot enable false
tcfshcrw May 7, 2024
07540b1
MCP4725 fix/code cleanup
tcfshcrw May 8, 2024
4dea57f
Unique COM port list
ChrGri May 8, 2024
10e69d1
Auto connect is follow each pedal now
tcfshcrw May 8, 2024
3b43cbf
workaround for auto-connect for ESP32S3
tcfshcrw May 10, 2024
7332fc3
bug fix for auto connect
tcfshcrw May 10, 2024
ff37760
small fix for combined axis
tcfshcrw May 11, 2024
993ebaa
stop the serial timer before reconnect back
tcfshcrw May 11, 2024
51b714d
DTR/RTS reset when opeing serial port to fix autoconnect
ChrGri May 13, 2024
6532d3a
Add RTS/DTR false control when connecting
tcfshcrw May 18, 2024
a455d39
Update arduino.yml
tcfshcrw May 20, 2024
f50c672
Add plugin version info into plugin
tcfshcrw May 20, 2024
5889c45
Add plugin dev version tag
tcfshcrw May 20, 2024
d0d8524
Bugfix: buffersize
ChrGri May 23, 2024
bb681eb
change esp32 core to 2.0.17
tcfshcrw May 28, 2024
62e0590
UI improvement
tcfshcrw Jun 10, 2024
31b6399
Add power circuit with brake resistor repo in the readme
tcfshcrw Jun 11, 2024
e8ba885
Made pedal only travel as much as parameterized travel length from si…
ChrGri Jun 21, 2024
f5a7521
Increased KF speed to reduce filter latency
ChrGri Jun 23, 2024
9dc1260
change wheeel slip amp scale
tcfshcrw Jun 28, 2024
7d7feb3
Added build script for platformio
ChrGri Jul 12, 2024
684a2fb
Updated action
ChrGri Jul 12, 2024
59535a5
Changed working dir for github action
ChrGri Jul 12, 2024
58e02c0
Bugfix #1
ChrGri Jul 12, 2024
dd09e78
Change to run on windows server
ChrGri Jul 12, 2024
4f2b669
Unified all boards build process
ChrGri Jul 12, 2024
dba2dc7
Bugfix
ChrGri Jul 12, 2024
48bb3f5
Zip the build artifacts
ChrGri Jul 12, 2024
df0d445
Bugfix #1
ChrGri Jul 12, 2024
8ee3c9b
Bugfix #2
ChrGri Jul 12, 2024
c1e789a
Bugfix #3
ChrGri Jul 12, 2024
12cb263
bugfix #4
ChrGri Jul 12, 2024
57605d8
bugfix #5
ChrGri Jul 12, 2024
d55280f
bugfix #6
ChrGri Jul 12, 2024
aa34dfb
bugfix #7
ChrGri Jul 12, 2024
8af2b70
bugfix #7
ChrGri Jul 12, 2024
88c572f
bugfix #9
ChrGri Jul 12, 2024
5f71b2f
bugfix #9
ChrGri Jul 12, 2024
2aa93dd
bugfix #10
ChrGri Jul 12, 2024
eee78b9
bugfix #11
ChrGri Jul 12, 2024
7787de7
bugfix #12
ChrGri Jul 12, 2024
9b33ed5
bugfix #13
ChrGri Jul 12, 2024
e951943
bugfix #14
ChrGri Jul 12, 2024
13b463a
#16
ChrGri Jul 12, 2024
e7d4487
Add action file for simhub plugin build
ChrGri Jul 12, 2024
a45e758
bugfix #1
ChrGri Jul 12, 2024
5f57a6e
added seperate workflow to publish releases
ChrGri Jul 12, 2024
86f8095
bugfix #1
ChrGri Jul 12, 2024
ba2e28b
bugfix #3
ChrGri Jul 12, 2024
59198bd
bugfix #4
ChrGri Jul 12, 2024
313db3b
bugfix #5
ChrGri Jul 12, 2024
239ae78
#6
ChrGri Jul 12, 2024
4e79628
#7
ChrGri Jul 12, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
combine axis for vjoy
tcfshcrw committed May 1, 2024
commit 8c4f61e563d78bc1a43e07b0d4ba9a5f92454831
1 change: 1 addition & 0 deletions SimHubPlugin/DataPluginDemo.cs
Original file line number Diff line number Diff line change
@@ -271,6 +271,7 @@ public class DIY_FFB_Pedal : IPlugin, IDataPlugin, IWPFSettingsV2
public uint overlay_display = 0;
public string simhub_theme_color = "#7E87CEFA";
public uint debug_value = 0;
public bool Rudder_enable_flag=false;



4 changes: 4 additions & 0 deletions SimHubPlugin/SettingsControlDemo.xaml
Original file line number Diff line number Diff line change
@@ -765,6 +765,10 @@
</Hyperlink>
</TextBlock>
<styles:SHButtonPrimary x:Name="btn_test" Click="btn_toast_Click" Width="30" Content="TEST" Height="20" Margin="0,10,0,0" HorizontalAlignment="Center" VerticalAlignment="Center" Padding="0,0,0,0" VerticalContentAlignment="Center" FontFamily="Arial" FontSize="10" MinHeight="20" />
<StackPanel Height="20" Width="160" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="5,4,0,0">
<styles:SHToggleButton x:Name="CheckBox_rudder" Content="" Checked="CheckBox_rudder_Checked" Unchecked="CheckBox_rudder_Unchecked" IsChecked="False" FontSize="10" Width="35" Height="15" HorizontalAlignment="Left" FontFamily="Arial" ToolTip="Dump pedal realtime status to file" RenderTransformOrigin="0.5,0.5" Margin="-10,0,0,0" />
<Label Content="Rudder" Height="20" Width="130" Padding="0,0,0,0" VerticalContentAlignment="Center" FontFamily="Arial" HorizontalAlignment="Left" FontSize="10" Margin="4,0,0,0"/>
</StackPanel>
</StackPanel>

</Border>
80 changes: 64 additions & 16 deletions SimHubPlugin/SettingsControlDemo.xaml.cs
Original file line number Diff line number Diff line change
@@ -103,6 +103,7 @@ public partial class SettingsControlDemo : System.Windows.Controls.UserControl
private string info_text_connection;
private int current_pedal_travel_state= 0;
private int gridline_kinematic_count_original = 0;
private double[] Pedal_position_reading=new double[3];

/*
private double kinematicDiagram_zeroPos_OX = 100;
@@ -2764,26 +2765,63 @@ unsafe public void timerCallback_serial(object sender, EventArgs e)
{

// write vJoy data
if (Plugin.Settings.vjoy_output_flag == 1)
Pedal_position_reading[pedalSelected] = pedalState_read_st.payloadPedalBasicState_.joystickOutput_u16;
if (Plugin.Rudder_enable_flag == false)
{
switch (pedalSelected)
if (Plugin.Settings.vjoy_output_flag == 1)
{
switch (pedalSelected)
{

case 0:
//joystick.SetJoystickAxis(pedalState_read_st.payloadPedalState_.joystickOutput_u16, Axis.HID_USAGE_RX); // Center X axis
joystick.SetAxis(pedalState_read_st.payloadPedalBasicState_.joystickOutput_u16, Plugin.Settings.vjoy_order, HID_USAGES.HID_USAGE_RX); // HID_USAGES Enums
break;
case 1:
//joystick.SetJoystickAxis(pedalState_read_st.payloadPedalState_.joystickOutput_u16, Axis.HID_USAGE_RY); // Center X axis
joystick.SetAxis(pedalState_read_st.payloadPedalBasicState_.joystickOutput_u16, Plugin.Settings.vjoy_order, HID_USAGES.HID_USAGE_RY); // HID_USAGES Enums
break;
case 2:
//joystick.SetJoystickAxis(pedalState_read_st.payloadPedalState_.joystickOutput_u16, Axis.HID_USAGE_RZ); // Center X axis
joystick.SetAxis(pedalState_read_st.payloadPedalBasicState_.joystickOutput_u16, Plugin.Settings.vjoy_order, HID_USAGES.HID_USAGE_RZ); // HID_USAGES Enums
break;
default:
break;
}

}

}
else
{
//Brk move

case 0:
//joystick.SetJoystickAxis(pedalState_read_st.payloadPedalState_.joystickOutput_u16, Axis.HID_USAGE_RX); // Center X axis
joystick.SetAxis(pedalState_read_st.payloadPedalBasicState_.joystickOutput_u16, Plugin.Settings.vjoy_order, HID_USAGES.HID_USAGE_RX); // HID_USAGES Enums
break;
case 1:
//joystick.SetJoystickAxis(pedalState_read_st.payloadPedalState_.joystickOutput_u16, Axis.HID_USAGE_RY); // Center X axis
joystick.SetAxis(pedalState_read_st.payloadPedalBasicState_.joystickOutput_u16, Plugin.Settings.vjoy_order, HID_USAGES.HID_USAGE_RY); // HID_USAGES Enums
break;
case 2:
//joystick.SetJoystickAxis(pedalState_read_st.payloadPedalState_.joystickOutput_u16, Axis.HID_USAGE_RZ); // Center X axis
joystick.SetAxis(pedalState_read_st.payloadPedalBasicState_.joystickOutput_u16, Plugin.Settings.vjoy_order, HID_USAGES.HID_USAGE_RZ); // HID_USAGES Enums
break;
default:
break;
if (Pedal_position_reading[1] > Pedal_position_reading[2])
{
double Rudder_axis_value = 16384;
Rudder_axis_value = Rudder_axis_value + Pedal_position_reading[1];

joystick.SetAxis((int)Rudder_axis_value, Plugin.Settings.vjoy_order, HID_USAGES.HID_USAGE_RZ); // HID_USAGES Enums
}
else
{
if (Pedal_position_reading[2] > Pedal_position_reading[1])
{
double Rudder_axis_value = 16384;
Rudder_axis_value = Rudder_axis_value - Pedal_position_reading[2];

joystick.SetAxis((int)Rudder_axis_value, Plugin.Settings.vjoy_order, HID_USAGES.HID_USAGE_RZ); // HID_USAGES Enums
}
else
{
joystick.SetAxis(16384, Plugin.Settings.vjoy_order, HID_USAGES.HID_USAGE_RZ);

}

}




}

@@ -5210,7 +5248,17 @@ private void Slider_VFgain_ValueChanged(object sender, RoutedPropertyChangedEven
label_VFgain.Content = "Feed Forward Gain: " + Math.Round(dap_config_st[indexOfSelectedPedal_u].payloadPedalConfig_.PID_velocity_feedforward_gain, 1);
}

private void CheckBox_rudder_Checked(object sender, RoutedEventArgs e)
{
Plugin.Rudder_enable_flag = true;

}

private void CheckBox_rudder_Unchecked(object sender, RoutedEventArgs e)
{
Plugin.Rudder_enable_flag = false;

}



Binary file modified SimHubPlugin/bin/DiyActivePedal.dll
Binary file not shown.