コード例 #1
0
 def set_accelerometer(self, accelerometer: xyz.Xyz) -> "Sensors":
     """
     Sets the channel
     :param accelerometer: Channel to set
     :return: A modified instance of self
     """
     redvox.api1000.common.typing.check_type(accelerometer, [xyz.Xyz])
     self.get_proto().accelerometer.CopyFrom(accelerometer.get_proto())
     self._accelerometer = xyz.Xyz(self.get_proto().accelerometer)
     return self
コード例 #2
0
 def set_rotation_vector(self, rotation_vector: xyz.Xyz) -> "Sensors":
     """
     Sets the channel
     :param rotation_vector: Channel to set
     :return: A modified instance of self
     """
     redvox.api1000.common.typing.check_type(rotation_vector, [xyz.Xyz])
     self.get_proto().rotation_vector.CopyFrom(rotation_vector.get_proto())
     self._rotation_vector = xyz.Xyz(self.get_proto().rotation_vector)
     return self
コード例 #3
0
 def set_orientation(self, orientation: xyz.Xyz) -> "Sensors":
     """
     Sets the channel
     :param orientation: Channel to set
     :return: A modified instance of self
     """
     redvox.api1000.common.typing.check_type(orientation, [xyz.Xyz])
     self.get_proto().orientation.CopyFrom(orientation.get_proto())
     self._orientation = xyz.Xyz(self.get_proto().orientation)
     return self
コード例 #4
0
 def set_gyroscope(self, gyroscope: xyz.Xyz) -> "Sensors":
     """
     Sets the channel
     :param gyroscope: Channel to set
     :return: A modified instance of self
     """
     redvox.api1000.common.typing.check_type(gyroscope, [xyz.Xyz])
     self.get_proto().gyroscope.CopyFrom(gyroscope.get_proto())
     self._gyroscope = xyz.Xyz(self.get_proto().gyroscope)
     return self
コード例 #5
0
 def set_gravity(self, gravity: xyz.Xyz) -> "Sensors":
     """
     Sets the channel
     :param gravity: Channel to set
     :return: A modified instance of self
     """
     redvox.api1000.common.typing.check_type(gravity, [xyz.Xyz])
     self.get_proto().gravity.CopyFrom(gravity.get_proto())
     self._gravity = xyz.Xyz(self.get_proto().gravity)
     return self
コード例 #6
0
 def set_linear_acceleration(self,
                             linear_acceleration: xyz.Xyz) -> "Sensors":
     """
     Sets the channel
     :param linear_acceleration: Channel to set
     :return: A modified instance of self
     """
     redvox.api1000.common.typing.check_type(linear_acceleration, [xyz.Xyz])
     self.get_proto().linear_acceleration.CopyFrom(
         linear_acceleration.get_proto())
     self._linear_acceleration = xyz.Xyz(
         self.get_proto().linear_acceleration)
     return self