mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-27 02:01:42 +00:00
[wpilib] Add support for Sharp IR sensors (#6023)
This commit is contained in:
25
wpilibc/src/main/native/include/frc/simulation/SharpIRSim.h
Normal file
25
wpilibc/src/main/native/include/frc/simulation/SharpIRSim.h
Normal file
@@ -0,0 +1,25 @@
|
||||
// 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
|
||||
|
||||
#include <hal/SimDevice.h>
|
||||
#include <units/length.h>
|
||||
|
||||
#include "frc/SharpIR.h"
|
||||
|
||||
namespace frc {
|
||||
|
||||
class SharpIRSim {
|
||||
public:
|
||||
explicit SharpIRSim(const SharpIR& sharpIR);
|
||||
explicit SharpIRSim(int channel);
|
||||
|
||||
void SetRange(units::centimeter_t rng);
|
||||
|
||||
private:
|
||||
hal::SimDouble m_simRange;
|
||||
};
|
||||
|
||||
} // namespace frc
|
||||
Reference in New Issue
Block a user