mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-05 03:21:42 +00:00
Switches AnalogInputs and AnalogTriggers to Handles (#117)
Results in a breaking change to AnalogTrigger int constructor. If a user wants multiple AnalogTriggers, they must use the AnalogInput constructor.
This commit is contained in:
committed by
Peter Johnson
parent
77a1af44c4
commit
e8e052712e
@@ -9,6 +9,7 @@
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "HAL/Handles.h"
|
||||
#include "LiveWindow/LiveWindowSendable.h"
|
||||
#include "PIDSource.h"
|
||||
#include "SensorBase.h"
|
||||
@@ -28,6 +29,8 @@
|
||||
class AnalogInput : public SensorBase,
|
||||
public PIDSource,
|
||||
public LiveWindowSendable {
|
||||
friend class AnalogTrigger;
|
||||
|
||||
public:
|
||||
static const uint8_t kAccumulatorModuleNumber = 1;
|
||||
static const uint32_t kAccumulatorNumChannels = 2;
|
||||
@@ -77,7 +80,7 @@ class AnalogInput : public SensorBase,
|
||||
private:
|
||||
uint32_t m_channel;
|
||||
// TODO: Adjust HAL to avoid use of raw pointers.
|
||||
void* m_port;
|
||||
HalAnalogInputHandle m_port;
|
||||
int64_t m_accumulatorOffset;
|
||||
|
||||
std::shared_ptr<ITable> m_table;
|
||||
|
||||
Reference in New Issue
Block a user