mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-02 02:51:42 +00:00
[hal] Use better error for when console out is enabled while attempting to use onboard serial port (#3622)
This commit is contained in:
@@ -84,6 +84,9 @@ HAL_SerialPortHandle HAL_InitializeSerialPortDirect(HAL_SerialPort port,
|
||||
serialPort->portId = open(portName, O_RDWR | O_NOCTTY);
|
||||
if (serialPort->portId < 0) {
|
||||
*status = errno;
|
||||
if (*status == EACCES) {
|
||||
*status = HAL_CONSOLE_OUT_ENABLED_ERROR;
|
||||
}
|
||||
serialPortHandles->Free(handle);
|
||||
return HAL_kInvalidHandle;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user