Releases: RMSSimRacing/FreeJoy
Releases · RMSSimRacing/FreeJoy
Release list
Encoder Fix - FSM Quadrature State Machine
Encoder Fix - FSM Quadrature State Machine
Fixes multiple encoder issues in FreeJoy firmware.
Problems fixed
- Ghost HID output when partially rotating and releasing the encoder
- Lost pulses on EC11 encoders due to time and direction blocking
- First step lost when quickly changing rotation direction
Solution
Replaced the original lookup table logic with a full quadrature FSM (Finite State Machine) for ENCODER_CONF_1x and ENCODER_CONF_2x modes.
- Bounce rejection is handled automatically by the FSM
- Direction changes are detected immediately without losing the first step
- ENCODER_CONF_4x keeps the original enc_array_4 logic, required for encoders like the ALPS RKJXT1F42001
Modified files
application/Src/encoders.capplication/Inc/common_types.h(addedfsm_statefield toencoder_state_tstruct)
Tested on
- EC16 (ENCODER_CONF_1x)
- EC11 (ENCODER_CONF_1x)
- ALPS RKJXT1F42001 (ENCODER_CONF_4x)
Installation
Flash FreeJoy.bin using FreeJoy Configurator, or FreeJoy.hex using ST-Link or similar programmer.
v1.0-encoder-fix
Fix for ghost HID output on rotary encoders (partial rotation false press).
Changes
- encoders.c: added cycle_started logic to EncoderProcess()
- common_types.h: added cycle_started field to encoder_state_t
How to flash
This firmware must be flashed through the FreeJoy Configurator:
- Open FreeJoy Configurator
- Go to the "Advanced Settings" tab
- Click "Enter Flasher Mode" and wait
- Click "Flash Firmware"
- Select this .bin file
- Wait for the process to complete and reconnect the device
Hardware
Compiled for STM32F103C8 (Blue Pill) — standard FreeJoy pinout.
If your pinout is different, recompile from the patched source.
Status
Pre-release / community testing. Please report results in issue FreeJoy-Team#160.