Skip to content

Feat(#2) : Add Equalizer on axis renderer and add hands-off detector#168

Open
manoukianv wants to merge 26 commits into
Ultrawipf:developmentfrom
manoukianv:feat/equalizer_handsoff
Open

Feat(#2) : Add Equalizer on axis renderer and add hands-off detector#168
manoukianv wants to merge 26 commits into
Ultrawipf:developmentfrom
manoukianv:feat/equalizer_handsoff

Conversation

@manoukianv
Copy link
Copy Markdown
Contributor

No description provided.

@manoukianv manoukianv changed the base branch from ultrawipf/testing to development December 19, 2025 10:55
@manoukianv manoukianv force-pushed the feat/equalizer_handsoff branch 3 times, most recently from c40e9ee to 56dce4b Compare April 23, 2026 07:25
@manoukianv manoukianv force-pushed the feat/equalizer_handsoff branch from 56dce4b to 15d53f8 Compare April 25, 2026 09:59
@manoukianv manoukianv force-pushed the feat/equalizer_handsoff branch from 15d53f8 to efd6cde Compare April 29, 2026 21:14
@manoukianv manoukianv force-pushed the feat/equalizer_handsoff branch from 60f90a0 to ae2d1e4 Compare May 10, 2026 10:37
return -powf(-torquef,expo) * 0x7fff;
}else{
return powf(torquef,expo) * 0x7fff;
int32_t Axis::calculateFFBTorque(){
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Converting back and forth between float and int32/16b int may lose resolution

BiquadType type = BiquadType::peak;
if (idx == 0) type = BiquadType::lowshelf;
else if (idx == num_eq_bands - 1) type = BiquadType::highshelf;
eqFilters[idx].setBiquad(type, eq_frequencies[idx] / filter_f, 2.14f, 0.0);
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Eq filters are not recalculated when the sample rate changes by updateSamplerate.


// STEP 3: Add endstops
// Note: Historically endstops are added before the Master Scaler.
// If hard endstops (like Simucube) are desired, this should be moved to STEP 5.
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it should absolutely not be moved after the scaling. everything MUST be scaled or you blow up your psu and bypass the scaler which in the case of the tmc is the actual current limit

- Change forces array from int64_t to int32_t to avoid unnecessary 64-bit math overhead.

- Deduplicate sine phase calculation using MATH_PI and MATH_SIN macros.

- Restore magnitude/offset assignment in HidFFB instead of EffectsCalculator to maintain separation of concerns.
- Prevents breaking SerialFFB and other sources that don't push samples to the reconstruction filter.
- Use MATH_PI, MATH_SIN, and MATH_COS macros to remove duplicate ifdef blocks for direction calculations.

- Fix Z-axis calculation missing DSP optimizations.
@manoukianv manoukianv force-pushed the feat/equalizer_handsoff branch from 5676cf7 to dc59753 Compare May 28, 2026 19:00
@manoukianv manoukianv force-pushed the feat/equalizer_handsoff branch from 6c36334 to ffb8ac4 Compare May 28, 2026 23:32
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