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

Added custom force feedback & fix periodic effects #22

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

ATG-Simulator
Copy link

  • Add DIPERIODIC structure support for Sine/Square/Triangle/Sawtooth effects

  • Implement proper effect creation and parameter handling

  • Add effect cleanup and release in DestroyFFBEffect

  • Fix memory management for periodic effects

  • Add debug logging for effect lifecycle tracking

  • Fix effect persistence after device reattachment

  • Set correct periodic effect parameters (magnitude, period, phase)

  • Integrate with existing FFB effect management system

  • Fixed periodic effects initialization and updates

  • Added debug logging system for FFB effect creation and updates

  • Implemented proper force data array management

  • Added sample period handling based on device capabilities

  • Corrected effect parameter initialization sequence

  • Added proper cleanup for custom force resources

  • Improved error handling and debug reporting

Technical details:

  • Implemented DICUSTOMFORCE structure with proper initialization
  • Added support for 10 magnitude inputs and sample period control
  • Fixed effect parameter synchronization between C++ and C#
  • Added proper memory management for force data arrays
  • Fixed E_INVALIDARG (0x80070057) error debugging
  • Added comprehensive debug logging system
  • Added proper cleanup in DestroyFFBEffect

Known issues:

  • Custom force effect creation still returns E_INVALIDARG despite correct parameters
  • Device reports custom force support but rejects effect creation

Note: Custom force implementation needs further investigation as the device reports support but rejects creation with proper parameters. A debug log will be created once it tested every time.

ATG-Simulator and others added 15 commits December 25, 2024 00:50
- Add DIPERIODIC structure support for Sine/Square/Triangle/Sawtooth effects
- Implement proper effect creation and parameter handling
- Add effect cleanup and release in DestroyFFBEffect
- Fix memory management for periodic effects
- Add debug logging for effect lifecycle tracking
- Fix effect persistence after device reattachment
- Set correct periodic effect parameters (magnitude, period, phase)
- Integrate with existing FFB effect management system

- Fixed periodic effects initialization and updates
- Added debug logging system for FFB effect creation and updates
- Implemented proper force data array management
- Added sample period handling based on device capabilities
- Corrected effect parameter initialization sequence
- Added proper cleanup for custom force resources
- Improved error handling and debug reporting

Technical details:
- Implemented DICUSTOMFORCE structure with proper initialization
- Added support for 10 magnitude inputs and sample period control
- Fixed effect parameter synchronization between C++ and C#
- Added proper memory management for force data arrays
- Fixed E_INVALIDARG (0x80070057) error debugging
- Added comprehensive debug logging system
- Added proper cleanup in DestroyFFBEffect

Known issues:
- Custom force effect creation still returns E_INVALIDARG despite correct parameters
- Device reports custom force support but rejects effect creation

Note: Custom force implementation needs further investigation as the device
reports support but rejects creation with proper parameters. A debug log will be created once it tested every time.
Added new info for hardware support as well as new features based on the latest code update
Added Demo App Preview Screenshot
- Updated the Demo App Screenshot
- Added a notice
fixed Thrustmaster links
Updated hardware support items
Added some clarifications
## Updated the Unity C# part
- Added periodic and custom effects
- Fixed the way the native DLL was wrongly called the Update Effects functions
- Added enhanced Ramp and Periodic parameters
## Updated ReadMe
- Added additional info
- Corrected typos
## Improved C++ Native code
- Ramp effect now uses Start and End
- Periodic effects now use frequency as well
### FFB Explorer utilizes the Ramp effect in the old simplified way
### Cleaned up the repository and added a Unity Sample Scene

The Custom Effects keep returning the Wrong Parameters value, so I hid it in the Unity Inspector but the fundamentals and all of its functions are already in the project.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants