@@ -547,6 +547,40 @@ def getUpdateInterval(self, ms, remote_id=None):
547547 """
548548 return self .getRead (POZYX_POS_INTERVAL , ms , remote_id )
549549
550+ def getRangingProtocol (self , protocol , remote_id = None ):
551+ """
552+ Obtains the Pozyx's ranging protocol
553+
554+ Args:
555+ protocol: Container for the read protocol data. SingleRegister or Data([0])
556+
557+ Kwargs:
558+ remote_id: Remote Pozyx ID
559+
560+ Returns:
561+ POZYX_SUCCESS, POZYX_FAILURE, POZYX_TIMEOUT
562+ """
563+ return self .getRead (POZYX_RANGE_PROTOCOL , protocol , remote_id )
564+
565+ def setRangingProtocol (self , protocol , remote_id = None ):
566+ """
567+ Set the Pozyx's ranging protocol.
568+
569+ Args:
570+ protocol: the new ranging protocol. See POZYX_RANGE_PROTOCOL register. integer or SingleRegister(protocol)
571+
572+ Kwargs:
573+ remote_id: Remote Pozyx ID
574+
575+ Returns:
576+ POZYX_SUCCESS, POZYX_FAILURE, POZYX_TIMEOUT
577+ """
578+ if not dataCheck (protocol ):
579+ protocol = SingleRegister (protocol )
580+ assert protocol [0 ] >= 0 and protocol [0 ] <= 2 , 'setRangingProtocol: wrong protocol %i' % protocol [0 ]
581+
582+ return self .setWrite (POZYX_RANGE_PROTOCOL , protocol , remote_id )
583+
550584 def getPositionAlgorithm (self , algorithm , remote_id = None ):
551585 """
552586 Obtains the Pozyx's positioning algorithm.
@@ -736,26 +770,6 @@ def setUpdateInterval(self, ms, remote_id=None):
736770 0 ] <= 600000 , 'setUpdateInterval: ms not 100<ms<60000'
737771 return self .setWrite (POZYX_POS_INTERVAL , ms , remote_id )
738772
739- def setOperationMode (self , mode , remote_id = None ):
740- """
741- Set the Pozyx's operation mode.
742-
743- Args:
744- mode: New operation mode. See POZYX_OPERATION_MODE register. integer mode or SingleRegister(mode).
745-
746- Kwargs:
747- remote_id: Remote Pozyx ID.
748-
749- Returns:
750- POZYX_SUCCESS, POZYX_FAILURE, POZYX_TIMEOUT
751- """
752- if not dataCheck (mode ):
753- mode = SingleRegister (mode )
754- assert mode [0 ] == POZYX_ANCHOR_MODE or mode [
755- 0 ] == POZYX_TAG_MODE , 'setOperationMode: wrong mode'
756-
757- return self .setWrite (POZYX_OPERATION_MODE , mode , remote_id )
758-
759773 def setCoordinates (self , coordinates , remote_id = None ):
760774 """
761775 Set the Pozyx's coordinates.
0 commit comments