digitaloutput.h
来自「good luck to everyone!」· C头文件 代码 · 共 37 行
H
37 行
/*----------------------------------------------------------------------------*/
/* Copyright (c) FIRST 2008. 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 $(WIND_BASE)/WPILib. */
/*----------------------------------------------------------------------------*/
#ifndef DIGITAL_OUTPUT_H_
#define DIGITAL_OUTPUT_H_
#include "SensorBase.h"
class DigitalModule;
/**
* Class to write to digital outputs.
* Write values to the digital output channels. Other devices implemented elsewhere will allocate
* channels automatically so for those devices it shouldn't be done here.
*/
class DigitalOutput : SensorBase
{
public:
explicit DigitalOutput(UINT32 channel);
DigitalOutput(UINT32 slot, UINT32 channel);
~DigitalOutput();
void Set(UINT32 value);
void Pulse(float length);
bool IsPulsing();
private:
void InitDigitalOutput(UINT32 slot, UINT32 channel);
UINT32 m_channel;
DigitalModule *m_module;
};
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?