mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-28 02:11:43 +00:00
Add methods to retreive the FPGA index for counters and encoders and return the encoding type as an integer
Change-Id: Iaa4062ec124b968b27e7c812cc754032fcb354d2 Add methods to retrieve the FPGA index for counters and encoders and return the encoding type as an integer Change-Id: If04dc291f39a9b331495d2b97a8b87d3ded71280
This commit is contained in:
@@ -23,8 +23,8 @@ void Counter::InitCounter(Mode mode)
|
||||
m_table = NULL;
|
||||
|
||||
int32_t status = 0;
|
||||
uint32_t index = 0;
|
||||
m_counter = initializeCounter(mode, &index, &status);
|
||||
m_index = 0;
|
||||
m_counter = initializeCounter(mode, &m_index, &status);
|
||||
wpi_setErrorWithContext(status, getHALErrorMessage(status));
|
||||
|
||||
m_upSource = NULL;
|
||||
@@ -34,7 +34,7 @@ void Counter::InitCounter(Mode mode)
|
||||
|
||||
SetMaxPeriod(.5);
|
||||
|
||||
HALReport(HALUsageReporting::kResourceType_Counter, index, mode);
|
||||
HALReport(HALUsageReporting::kResourceType_Counter, m_index, mode);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user