@@ -168,7 +168,6 @@ class Platform(enum.Enum):
168
168
""" Available hardware platforms """
169
169
170
170
BITBOX02 = "bitbox02"
171
- BITBOXBASE = "bitboxbase"
172
171
173
172
174
173
class BitBox02Edition (enum .Enum ):
@@ -178,12 +177,6 @@ class BitBox02Edition(enum.Enum):
178
177
BTCONLY = "btconly"
179
178
180
179
181
- class BitBoxBaseEdition (enum .Enum ):
182
- """ Editions for the BitBoxBase platform """
183
-
184
- STANDARD = "standard"
185
-
186
-
187
180
class Bitbox02Exception (Exception ):
188
181
def __init__ (self , code : int , message : str ):
189
182
self .code = code
@@ -549,7 +542,7 @@ def __init__(
549
542
self .version .major , self .version .minor , self .version .patch , build = self .version .build
550
543
)
551
544
552
- # raises exceptions if the library is out of date, does not check BitBoxBase
545
+ # raises exceptions if the library is out of date
553
546
self ._check_max_version ()
554
547
555
548
self ._bitbox_protocol : BitBoxProtocol
@@ -668,13 +661,11 @@ def reboot(
668
661
return True
669
662
670
663
@staticmethod
671
- def get_info (
672
- transport : TransportLayer
673
- ) -> Tuple [str , Platform , Union [BitBox02Edition , BitBoxBaseEdition ], bool ]:
664
+ def get_info (transport : TransportLayer ) -> Tuple [str , Platform , Union [BitBox02Edition ], bool ]:
674
665
"""
675
666
Returns (version, platform, edition, unlocked).
676
667
This is useful to get the version of the firmware when a usb descriptor is not available
677
- (BitBoxBase, via BitBoxBridge, etc.).
668
+ (via BitBoxBridge, etc.).
678
669
This call does not use a versioned BitBoxProtocol for communication, as the version is not
679
670
available (this call is used to get the version), so it must work for all firmware versions.
680
671
"""
@@ -688,11 +679,11 @@ def get_info(
688
679
platform = {0x00 : Platform .BITBOX02 }[platform_byte ]
689
680
690
681
edition_byte , response = response [0 ], response [1 :]
691
- edition : Union [BitBox02Edition , BitBoxBaseEdition ]
682
+ edition : Union [BitBox02Edition ]
692
683
if platform == Platform .BITBOX02 :
693
684
edition = {0x00 : BitBox02Edition .MULTI , 0x01 : BitBox02Edition .BTCONLY }[edition_byte ]
694
685
else :
695
- edition = { 0x00 : BitBoxBaseEdition . STANDARD }[ edition_byte ]
686
+ raise Exception ( "Unknown platform: {}" . format ( platform ))
696
687
697
688
unlocked_byte = response [0 ]
698
689
unlocked = {0x00 : False , 0x01 : True }[unlocked_byte ]
@@ -701,7 +692,7 @@ def get_info(
701
692
def check_min_version (self ) -> None :
702
693
"""
703
694
Raises FirmwareVersionOutdatedException if the device has an older firmware version than
704
- required and the minimum required version. A check for the BitBoxBase is not implemented.
695
+ required and the minimum required version.
705
696
"""
706
697
if self .edition == BitBox02Edition .MULTI :
707
698
if self .version < MIN_SUPPORTED_BITBOX02_MULTI_FIRMWARE_VERSION :
@@ -721,7 +712,6 @@ def _check_max_version(self) -> None:
721
712
"""
722
713
Raises LibraryVersionOutdatedException if the device has an firmware which is too new
723
714
(major version increased).
724
- A check for the BitBoxBase is not implemented.
725
715
"""
726
716
if self .edition == BitBox02Edition .MULTI :
727
717
if self .version >= MIN_UNSUPPORTED_BITBOX02_MULTI_FIRMWARE_VERSION :
0 commit comments