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

🐛 Fix Flags<N> data storage width #26995

Merged
merged 2 commits into from
Apr 21, 2024

Conversation

sjasonsmith
Copy link
Contributor

@sjasonsmith sjasonsmith commented Apr 21, 2024

Description

Previously added unit tests identified that the storage for the Flags type was always 8 bits, even if many more flags than this were requested.

This was due to the incorrect use of uvalue_t instead of bits_t when defining flagbits_t.

This PR fixes the underlying root cause, and adjusts the unit tests to verify the intended edges cases for the class.

The actual impact of this bug was probably limited to uncommon machines with more than 8 axis. I believe that this could have caused some Axis to not move, when using every available axis in Marlin.

@sjasonsmith sjasonsmith changed the title 🐛 Fix Flags data storage width 🐛 Fix Flags<N> data storage width Apr 21, 2024
@sjasonsmith sjasonsmith merged commit d773570 into MarlinFirmware:bugfix-2.1.x Apr 21, 2024
62 checks passed
@sjasonsmith sjasonsmith deleted the PR/fix_flags branch April 21, 2024 16:43
mikezs added a commit to mikezs/Marlin that referenced this pull request Apr 26, 2024
* bugfix-2.1.x: (111 commits)
  [cron] Bump distribution date (2024-04-25)
  🩹 IA-Creality minor cleanup
  🩹 Simple IA-Creality babystep patch
  🚸 Fix duplicate temperature report (MarlinFirmware#26952)
  [cron] Bump distribution date (2024-04-24)
  ✏️ MPCTEMP_START => MPC_STARTED (MarlinFirmware#27002)
  🔧 BIQU MicroProbe V2 pull-up warning (MarlinFirmware#27008)
  🎨 Format pins which fail validation (MarlinFirmware#27007)
  ✅  CI - Validate Pins Formatting (MarlinFirmware#26996)
  [cron] Bump distribution date (2024-04-23)
  🎨 Clean up after recent PRs
  [cron] Bump distribution date (2024-04-22)
  🐛 Fix Flags<N> data storage width (MarlinFirmware#26995)
  ✅ Add additional unit tests for types.h (MarlinFirmware#26994)
  ✅ Unit test improvements (MarlinFirmware#26993)
  🔧 Add RAMPS TMC SPI pins when !TMC_USE_SW_SPI (MarlinFirmware#26960)
  🐛 Fix PID upon entering PID_FUNCTIONAL_RANGE (MarlinFirmware#26926)
  [cron] Bump distribution date (2024-04-21)
  🎨Match unit test folder structure to code (MarlinFirmware#26990)
  ✅ Skip compile tests when editing unit tests (MarlinFirmware#26991)
  ...
RPGFabi pushed a commit to RPGFabi/Marlin that referenced this pull request Jun 15, 2024
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