mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
Fix usage reporting indices (#2009)
According to NI, 0 is unspecified, and all the indices need to be index + 1, so the first index becomes 1.
This commit is contained in:
committed by
Peter Johnson
parent
f6b844ea30
commit
9dc30797e4
@@ -41,7 +41,8 @@ SerialPort::SerialPort(int baudRate, Port port, int dataBits,
|
||||
|
||||
DisableTermination();
|
||||
|
||||
HAL_Report(HALUsageReporting::kResourceType_SerialPort, 0);
|
||||
HAL_Report(HALUsageReporting::kResourceType_SerialPort,
|
||||
static_cast<uint8_t>(port) + 1);
|
||||
}
|
||||
|
||||
SerialPort::SerialPort(int baudRate, const wpi::Twine& portName, Port port,
|
||||
@@ -74,7 +75,8 @@ SerialPort::SerialPort(int baudRate, const wpi::Twine& portName, Port port,
|
||||
|
||||
DisableTermination();
|
||||
|
||||
HAL_Report(HALUsageReporting::kResourceType_SerialPort, 0);
|
||||
HAL_Report(HALUsageReporting::kResourceType_SerialPort,
|
||||
static_cast<uint8_t>(port) + 1);
|
||||
}
|
||||
|
||||
SerialPort::~SerialPort() {
|
||||
|
||||
Reference in New Issue
Block a user