# validated: 2017-12-27 TW 8b7aa61091df edu/wpi/first/wpilibj/Utility.java
#----------------------------------------------------------------------------
# Copyright (c) FIRST 2008-2016. All Rights Reserved.
# Open Source Software - may be modified and shared by FRC teams. The code
# must be accompanied by the FIRST BSD license file in the root directory of
# the project.
#----------------------------------------------------------------------------
import hal
__all__ = ["Utility"]
[docs]class Utility:
"""Contains global utility functions
.. deprecated:: 2018.0.0
Use :class:`.RobotController` instead
"""
[docs] @staticmethod
def getFPGAVersion():
"""Return the FPGA Version number.
.. deprecated:: 2018.0.0
Use :meth:`.RobotController.getFPGAVersion` instead
:returns: FPGA Version number.
:rtype: int
"""
return hal.getFPGAVersion()
[docs] @staticmethod
def getFPGARevision():
"""Return the FPGA Revision number. The format of the revision is 3
numbers. The 12 most significant bits are the Major Revision. the
next 8 bits are the Minor Revision. The 12 least significant bits
are the Build Number.
.. deprecated:: 2018.0.0
Use :meth:`.RobotController.getFPGARevision` instead
:returns: FPGA Revision number.
:rtype: int
"""
return hal.getFPGARevision()
[docs] @staticmethod
def getFPGATime():
"""Read the microsecond timer from the FPGA.
.. deprecated:: 2018.0.0
Use :meth:`.RobotController.getFPGATime` instead
:returns: The current time in microseconds according to the FPGA.
:rtype: int
"""
return hal.getFPGATime()