def get(self):
        """Get the current reading of the potentiometer.

        :returns: The current position of the potentiometer.
        :rtype: float
        """
        return (self.analog_input.getVoltage() / hal.getUserVoltage5V()) * self.fullRange + self.offset
    def get(self):
        """Get the current reading of the potentiometer.

        :returns: The current position of the potentiometer.
        :rtype: float
        """
        return (self.analog_input.getVoltage() / hal.getUserVoltage5V()) * self.fullRange + self.offset
Exemplo n.º 3
0
    def getVoltage5V() -> float:
        """
            Get the voltage of the 5V rail


            :returns: The controller 5V rail voltage value in Volts
        """
        return hal.getUserVoltage5V()
Exemplo n.º 4
0
 def getVoltage5V():
     """
         Get the voltage of the 5V rail
         
         :returns: The controller 5V rail voltage value in Volts
         :rtype: float
     """
     return hal.getUserVoltage5V()
Exemplo n.º 5
0
 def getVoltage5V() -> float:
     """Get the voltage of the 5V rail.
     
     :returns: The controller 5V rail voltage value in Volts
     """
     return hal.getUserVoltage5V()