DEV-737 change default USB speed and value#276
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates USB speed handling in EepromSensorSettingsDetails by replacing the mUsbFullSpeed flag with mUsbHighSpeed and aligning the USB_SPEED enum names/bit values to match the intended meaning (High-Speed = bit 0x04, Full-Speed = 0x00). This improves clarity and ensures EEPROM bit parsing/writing matches the chosen speed.
Changes:
- Renamed the stored USB speed state from
mUsbFullSpeedtomUsbHighSpeedand updated all related logic. - Updated
USB_SPEEDenum labeling and bit values to reflect 480 Mbps vs 12 Mbps. - Adjusted parsing/debug string generation and EEPROM page updates to use the new flag and mapping.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request updates how USB speed settings are represented and managed in the
EepromSensorSettingsDetailsclass. The main change is a shift from using amUsbFullSpeedboolean to amUsbHighSpeedboolean, along with clarifying the meaning and bit values for USB speed options. These changes improve code clarity and ensure correct mapping between the boolean state and the USB speed configuration.USB Speed Handling Updates:
mUsbFullSpeedboolean withmUsbHighSpeedthroughout the class to more accurately reflect the intended USB speed state. [1] [2] [3] [4]USB_SPEEDenum to clarify speed names and bit values:HIGH_SPEEDnow represents 480 Mbps with bit value0x04, andFULL_SPEEDis 12 Mbps with bit value0x00.parseEepromSensorSettingsDetails,generateDebugString,setUsbSpeedStateFromString, andupdateEepromPageArrayto use the newmUsbHighSpeedfield and the revised enum values, ensuring correct USB speed setting and reporting. [1] [2] [3]