Skip to content

Feat(#3): Add TMC anticogging slewratedetector#169

Open
manoukianv wants to merge 27 commits into
Ultrawipf:developmentfrom
manoukianv:feat/tmc_anticogging_slewratedetector
Open

Feat(#3): Add TMC anticogging slewratedetector#169
manoukianv wants to merge 27 commits into
Ultrawipf:developmentfrom
manoukianv:feat/tmc_anticogging_slewratedetector

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:56
@manoukianv manoukianv force-pushed the feat/tmc_anticogging_slewratedetector branch 5 times, most recently from 6a08cf6 to a0d9a73 Compare April 24, 2026 15:32
@manoukianv manoukianv force-pushed the feat/tmc_anticogging_slewratedetector branch from a0d9a73 to dbdc12d Compare April 25, 2026 09:59
@manoukianv manoukianv force-pushed the feat/tmc_anticogging_slewratedetector branch 2 times, most recently from ab2f2ae to e7ac16a Compare April 29, 2026 21:33
@manoukianv manoukianv force-pushed the feat/tmc_anticogging_slewratedetector branch from 96d5c8d to 5cc4464 Compare May 10, 2026 11:42
@manoukianv manoukianv force-pushed the feat/tmc_anticogging_slewratedetector branch from 06a8e72 to eac8b73 Compare May 26, 2026 09:44
@manoukianv manoukianv force-pushed the feat/tmc_anticogging_slewratedetector branch from eac8b73 to 8fcc460 Compare May 28, 2026 16:35
- 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/tmc_anticogging_slewratedetector branch from 8fcc460 to a413fde Compare May 28, 2026 19:39
…nd command handler

- Implement anti-cogging calibration using DFT frequency analysis.
- Optimize RAM usage by reducing the flash write buffer from 32KB to 1KB.
- Update STM32 Flash linker scripts (.ld) to allocate a safe, dedicated sector for cogging tables.
- Optimize CommandHandler performance by preventing implicit std::string allocations (using append instead of +=) and removing costly vector shrink_to_fit calls.
- Add linear interpolation on cogging samples and synchronize read processes.
@manoukianv manoukianv force-pushed the feat/tmc_anticogging_slewratedetector branch from a413fde to 71f0312 Compare May 28, 2026 23:06
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.

1 participant