@@ -933,7 +933,7 @@ def _process_report(self, report_id: int, report_bytes: bytearray) -> None:
933933 @staticmethod
934934 def _get_feature_enable_report (
935935 feature_id : int ,
936- report_interval : int = _DEFAULT_REPORT_INTERVAL ,
936+ report_interval : int ,
937937 sensor_specific_config : int = 0 ,
938938 ) -> bytearray :
939939 set_feature_report = bytearray (17 )
@@ -947,16 +947,20 @@ def _get_feature_enable_report(
947947 # TODO: add docs for available features
948948 # TODO2: I think this should call an fn that imports all the bits for the given feature
949949 # so we're not carrying around stuff for extra features
950- def enable_feature (self , feature_id : int ) -> None :
950+ def enable_feature (
951+ self ,
952+ feature_id : int ,
953+ report_interval : int = _DEFAULT_REPORT_INTERVAL ,
954+ ) -> None :
951955 """Used to enable a given feature of the BNO08x"""
952956 self ._dbg ("\n ********** Enabling feature id:" , feature_id , "**********" )
953957
954958 if feature_id == BNO_REPORT_ACTIVITY_CLASSIFIER :
955959 set_feature_report = self ._get_feature_enable_report (
956- feature_id , sensor_specific_config = _ENABLED_ACTIVITIES
960+ feature_id , report_interval , _ENABLED_ACTIVITIES
957961 )
958962 else :
959- set_feature_report = self ._get_feature_enable_report (feature_id )
963+ set_feature_report = self ._get_feature_enable_report (feature_id , report_interval )
960964
961965 feature_dependency = _RAW_REPORTS .get (feature_id , None )
962966 # if the feature was enabled it will have a key in the readings dict
0 commit comments