Conversation
PiperOrigin-RevId: 892354630
PiperOrigin-RevId: 892959815
PiperOrigin-RevId: 893050627
PiperOrigin-RevId: 893673111
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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.
| [-\d()./:]+ # Matches RSSI (skipped) | |
| \S+ # Matches RSSI (skipped) |
No description provided.