mirror of
https://github.com/google/bumble.git
synced 2026-06-01 07:37:02 +00:00
Merge pull request #52 from mogenson/mogenson/console-py-clear-scan-results
add 'scan clear' command to console.py
This commit is contained in:
+9
-1
@@ -151,7 +151,8 @@ class ConsoleApp:
|
||||
return NestedCompleter.from_nested_dict({
|
||||
'scan': {
|
||||
'on': None,
|
||||
'off': None
|
||||
'off': None,
|
||||
'clear': None
|
||||
},
|
||||
'advertise': {
|
||||
'on': None,
|
||||
@@ -472,6 +473,10 @@ class ConsoleApp:
|
||||
self.top_tab = 'scan'
|
||||
elif params[0] == 'off':
|
||||
await self.device.stop_scanning()
|
||||
elif params[0] == 'clear':
|
||||
self.device.listener.scan_results.clear()
|
||||
self.known_addresses.clear()
|
||||
self.show_scan_results(self.device.listener.scan_results)
|
||||
else:
|
||||
self.show_error('unsupported arguments for scan command')
|
||||
|
||||
@@ -503,6 +508,9 @@ class ConsoleApp:
|
||||
for phy in phys
|
||||
}
|
||||
|
||||
if self.device.is_scanning:
|
||||
await self.device.stop_scanning()
|
||||
|
||||
self.append_to_output('connecting...')
|
||||
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user