Skip to content

Commit

Permalink
Provide IntFlag.name property fallback
Browse files Browse the repository at this point in the history
  • Loading branch information
zxzxwu committed Nov 26, 2023
1 parent a9628f7 commit 9584f04
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions bumble/hci.py
Original file line number Diff line number Diff line change
Expand Up @@ -3872,11 +3872,19 @@ class AdvertisingProperties(enum.IntFlag):
ANONYMOUS_ADVERTISING = 1 << 5
INCLUDE_TX_POWER = 1 << 6

@property
def name(self) -> str:
return super().name or str(self)

class ChannelMap(enum.IntFlag):
CHANNEL_37 = 1 << 0
CHANNEL_38 = 1 << 1
CHANNEL_39 = 1 << 2

@property
def name(self) -> str:
return super().name or str(self)


# -----------------------------------------------------------------------------
@HCI_Command.command(
Expand Down

0 comments on commit 9584f04

Please sign in to comment.