mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
Moves Interrupts over to Handles instead of pointers (#99)
This commit is contained in:
committed by
Peter Johnson
parent
74fc10999b
commit
046e043c4e
@@ -29,12 +29,11 @@ AnalogTriggerOutput::AnalogTriggerOutput(const AnalogTrigger& trigger,
|
||||
}
|
||||
|
||||
AnalogTriggerOutput::~AnalogTriggerOutput() {
|
||||
if (m_interrupt != nullptr) {
|
||||
if (m_interrupt != HAL_INVALID_HANDLE) {
|
||||
int32_t status = 0;
|
||||
cleanInterrupts(m_interrupt, &status);
|
||||
wpi_setErrorWithContext(status, getHALErrorMessage(status));
|
||||
m_interrupt = nullptr;
|
||||
m_interrupts->Free(m_interruptIndex);
|
||||
// ignore status, as an invalid handle just needs to be ignored.
|
||||
m_interrupt = HAL_INVALID_HANDLE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user