mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-05 03:21:42 +00:00
SCRIPT Move cc files
This commit is contained in:
committed by
Peter Johnson
parent
10b4a0c971
commit
7ca1be9bae
66
wpilibc/src/main/native/include/wpi/util/SensorUtil.hpp
Normal file
66
wpilibc/src/main/native/include/wpi/util/SensorUtil.hpp
Normal file
@@ -0,0 +1,66 @@
|
||||
// Copyright (c) FIRST and other WPILib contributors.
|
||||
// Open Source Software; you can modify and/or share it under the terms of
|
||||
// the WPILib BSD license file in the root directory of this project.
|
||||
|
||||
#pragma once
|
||||
|
||||
namespace frc {
|
||||
|
||||
/**
|
||||
* Stores most recent status information as well as containing utility functions
|
||||
* for checking channels and error processing.
|
||||
*/
|
||||
class SensorUtil final {
|
||||
public:
|
||||
SensorUtil() = delete;
|
||||
|
||||
/**
|
||||
* Get the number of the default solenoid module.
|
||||
*
|
||||
* @return The number of the default solenoid module.
|
||||
*/
|
||||
static int GetDefaultCTREPCMModule();
|
||||
|
||||
/**
|
||||
* Get the number of the default solenoid module.
|
||||
*
|
||||
* @return The number of the default solenoid module.
|
||||
*/
|
||||
static int GetDefaultREVPHModule();
|
||||
|
||||
/**
|
||||
* Check that the digital channel number is valid.
|
||||
*
|
||||
* Verify that the channel number is one of the legal channel numbers. Channel
|
||||
* numbers are 0-based.
|
||||
*
|
||||
* @return Digital channel is valid
|
||||
*/
|
||||
static bool CheckDigitalChannel(int channel);
|
||||
|
||||
/**
|
||||
* Check that the PWM channel number is valid.
|
||||
*
|
||||
* Verify that the channel number is one of the legal channel numbers. Channel
|
||||
* numbers are 0-based.
|
||||
*
|
||||
* @return PWM channel is valid
|
||||
*/
|
||||
static bool CheckPWMChannel(int channel);
|
||||
|
||||
/**
|
||||
* Check that the analog input number is value.
|
||||
*
|
||||
* Verify that the analog input number is one of the legal channel numbers.
|
||||
* Channel numbers are 0-based.
|
||||
*
|
||||
* @return Analog channel is valid
|
||||
*/
|
||||
static bool CheckAnalogInputChannel(int channel);
|
||||
|
||||
static int GetNumDigitalChannels();
|
||||
static int GetNumAnalogInputs();
|
||||
static int GetNumPwmChannels();
|
||||
};
|
||||
|
||||
} // namespace frc
|
||||
Reference in New Issue
Block a user