Skip to content

Sync changes from internal dev branch.#86

Closed
lip-liu wants to merge 4 commits intomainfrom
copybara_HEAD
Closed

Sync changes from internal dev branch.#86
lip-liu wants to merge 4 commits intomainfrom
copybara_HEAD

Conversation

@lip-liu
Copy link
Copy Markdown
Collaborator

@lip-liu lip-liu commented Apr 2, 2026

No description provided.

lip-liu and others added 4 commits April 2, 2026 21:16
PiperOrigin-RevId: 892354630
PiperOrigin-RevId: 892959815
PiperOrigin-RevId: 893050627
PiperOrigin-RevId: 893673111
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates the regex pattern in betocq/setup_utils.py to accommodate a wider range of characters in the RSSI field of wifi scan results. The feedback suggests simplifying the regex to use \S+ since the field is skipped and not captured, which would make the parsing more robust against variations in output formats across different devices.

(\d+) # Captures Frequency
\s+
[-\d.]+ # Matches RSSI (skipped)
[-\d()./:]+ # Matches RSSI (skipped)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The regex for the RSSI field is becoming increasingly complex and specific. Since this field is skipped and not captured, using \S+ (matching any non-whitespace characters) would be more robust and maintainable. This avoids the need to update the character set whenever the output format of the cmd wifi list-scan-results command changes slightly across different devices or Android versions.

Suggested change
[-\d()./:]+ # Matches RSSI (skipped)
\S+ # Matches RSSI (skipped)

@lip-liu lip-liu closed this Apr 2, 2026
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