Skip to content

Commit

Permalink
Merge pull request #597 from google/gbg/intel-hci
Browse files Browse the repository at this point in the history
intel hci
  • Loading branch information
barbibulle authored Nov 29, 2024
2 parents 082d55a + 48685c8 commit d014acb
Show file tree
Hide file tree
Showing 13 changed files with 1,051 additions and 62 deletions.
3 changes: 2 additions & 1 deletion apps/bench.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ def log_stats(title, stats, precision=2):
stats_min = min(stats)
stats_max = max(stats)
stats_avg = statistics.mean(stats)
stats_stdev = statistics.stdev(stats)
stats_stdev = statistics.stdev(stats) if len(stats) >= 2 else 0
logging.info(
color(
(
Expand Down Expand Up @@ -468,6 +468,7 @@ async def run(self):

for run in range(self.repeat + 1):
self.done.clear()
self.ping_times = []

if run > 0 and self.repeat and self.repeat_delay:
logging.info(color(f'*** Repeat delay: {self.repeat_delay}', 'green'))
Expand Down
12 changes: 6 additions & 6 deletions apps/show.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,18 +144,18 @@ def print(self, message: str) -> None:
help='Format of the input file',
)
@click.option(
'--vendors',
'--vendor',
type=click.Choice(['android', 'zephyr']),
multiple=True,
help='Support vendor-specific commands (list one or more)',
)
@click.argument('filename')
# pylint: disable=redefined-builtin
def main(format, vendors, filename):
for vendor in vendors:
if vendor == 'android':
def main(format, vendor, filename):
for vendor_name in vendor:
if vendor_name == 'android':
import bumble.vendor.android.hci
elif vendor == 'zephyr':
elif vendor_name == 'zephyr':
import bumble.vendor.zephyr.hci

input = open(filename, 'rb')
Expand All @@ -180,7 +180,7 @@ def read_next_packet():
else:
printer.print(color("[TRUNCATED]", "red"))
except Exception as error:
logger.exception()
logger.exception('')
print(color(f'!!! {error}', 'red'))


Expand Down
2 changes: 2 additions & 0 deletions bumble/drivers/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
# -----------------------------------------------------------------------------
import abc

from bumble import core


# -----------------------------------------------------------------------------
# Classes
Expand Down
Loading

0 comments on commit d014acb

Please sign in to comment.