mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-25 01:41:43 +00:00
Move CameraServer and WPILib headers into their own folder
The old headers were moved into folders because doing so avoids polluting the system include directories. Folder names were also normalized to lowercase.
This commit is contained in:
committed by
Peter Johnson
parent
31ced30c1e
commit
d89b7dd412
@@ -1,72 +0,0 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2008-2018 FIRST. 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. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "Counter.h"
|
||||
|
||||
namespace frc {
|
||||
|
||||
/**
|
||||
* Alias for counter class.
|
||||
*
|
||||
* Implements the gear tooth sensor supplied by FIRST. Currently there is no
|
||||
* reverse sensing on the gear tooth sensor, but in future versions we might
|
||||
* implement the necessary timing in the FPGA to sense direction.
|
||||
*/
|
||||
class GearTooth : public Counter {
|
||||
public:
|
||||
// 55 uSec for threshold
|
||||
static constexpr double kGearToothThreshold = 55e-6;
|
||||
|
||||
/**
|
||||
* Construct a GearTooth sensor given a channel.
|
||||
*
|
||||
* @param channel The DIO channel that the sensor is connected to.
|
||||
* 0-9 are on-board, 10-25 are on the MXP.
|
||||
* @param directionSensitive True to enable the pulse length decoding in
|
||||
* hardware to specify count direction.
|
||||
*/
|
||||
explicit GearTooth(int channel, bool directionSensitive = false);
|
||||
|
||||
/**
|
||||
* Construct a GearTooth sensor given a digital input.
|
||||
*
|
||||
* This should be used when sharing digital inputs.
|
||||
*
|
||||
* @param source A pointer to the existing DigitalSource object
|
||||
* (such as a DigitalInput)
|
||||
* @param directionSensitive True to enable the pulse length decoding in
|
||||
* hardware to specify count direction.
|
||||
*/
|
||||
explicit GearTooth(DigitalSource* source, bool directionSensitive = false);
|
||||
|
||||
/**
|
||||
* Construct a GearTooth sensor given a digital input.
|
||||
*
|
||||
* This should be used when sharing digital inputs.
|
||||
*
|
||||
* @param source A reference to the existing DigitalSource object
|
||||
* (such as a DigitalInput)
|
||||
* @param directionSensitive True to enable the pulse length decoding in
|
||||
* hardware to specify count direction.
|
||||
*/
|
||||
explicit GearTooth(std::shared_ptr<DigitalSource> source,
|
||||
bool directionSensitive = false);
|
||||
|
||||
/**
|
||||
* Common code called by the constructors.
|
||||
*/
|
||||
void EnableDirectionSensing(bool directionSensitive);
|
||||
|
||||
void InitSendable(SendableBuilder& builder) override;
|
||||
};
|
||||
|
||||
} // namespace frc
|
||||
Reference in New Issue
Block a user