Skip to content

Commit

Permalink
Merge branch 'main' into nus-buffers-at-least-mtu
Browse files Browse the repository at this point in the history
  • Loading branch information
dhalbert authored Oct 21, 2024
2 parents 7c7c7dd + 3ee63d2 commit 3170d45
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,8 @@ valid-metaclass-classmethod-first-arg=mcs
[DESIGN]

# Maximum number of arguments for function / method
max-args=5
# Changed for this library, Adafruit_CircuitPython_BLE
max-args=9

# Maximum number of attributes for a class (see R0902).
# max-attributes=7
Expand Down
7 changes: 5 additions & 2 deletions adafruit_ble/services/standard/device_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,14 @@
import binascii
import os
import sys
from collections.abc import Iterable

from .. import Service
from ...uuid import StandardUUID
from ...characteristics import StructCharacteristic
from ...characteristics.string import FixedStringCharacteristic

try:
from typing import Optional, TYPE_CHECKING
from typing import Iterable, Optional, TYPE_CHECKING

if TYPE_CHECKING:
import _bleio
Expand Down Expand Up @@ -72,6 +71,10 @@ def __init__( # pylint: disable=too-many-arguments
pass
if firmware_revision is None:
firmware_revision = getattr(os.uname(), "version", None)
if pnp_id is None:
# These values are not necessarily valid according to the spec,
# but they work on Android and iOS.
pnp_id = (0x00, 0x0000, 0x0000, 0x0000)
super().__init__(
manufacturer=manufacturer,
software_revision=software_revision,
Expand Down

0 comments on commit 3170d45

Please sign in to comment.