mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-06 03:31:43 +00:00
Move SerialPort to HAL and add SerialPort support for Java
Squashed commit of the following: commit 4359262e2fef69b1646e3d76641fe622a78dfd89 Author: Kevin O'Connor <koconnor@usfirst.org> Date: Wed Oct 29 13:43:12 2014 -0400 Add SerialPort to JNI and modify Java SerialPort to use it. Change-Id: Id3e6fa538a50e6a96274d8fb1be546dc396fc9c6 commit 114b192388c2fb01745cb3d5ad83612e9d66ea83 Author: Kevin O'Connor <koconnor@usfirst.org> Date: Tue Oct 28 15:46:06 2014 -0400 Move Serial port handling to HAL and define serial errors Change-Id: I4cc73b64d71aafacb410bce080cb29e5fdf565a3 Change-Id: I35b729ad502137ee4c877a415d78007861991e31
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
#include "Port.h"
|
||||
#include "HAL/Errors.hpp"
|
||||
#include "ctre/ctre.h"
|
||||
#include "visa/visa.h"
|
||||
#include "ChipObject.h"
|
||||
#include "NetworkCommunication/FRCComm.h"
|
||||
#include "NetworkCommunication/UsageReporting.h"
|
||||
@@ -101,7 +102,31 @@ const char* getHALErrorMessage(int32_t code)
|
||||
case ERR_CANSessionMux_NotAllowed:
|
||||
return ERR_CANSessionMux_NotAllowed_MESSAGE;
|
||||
case ERR_CANSessionMux_NotInitialized:
|
||||
return ERR_CANSessionMux_NotInitialized_MESSAGE;
|
||||
return ERR_CANSessionMux_NotInitialized_MESSAGE;
|
||||
case VI_ERROR_SYSTEM_ERROR:
|
||||
return VI_ERROR_SYSTEM_ERROR_MESSAGE;
|
||||
case VI_ERROR_INV_OBJECT:
|
||||
return VI_ERROR_INV_OBJECT_MESSAGE;
|
||||
case VI_ERROR_RSRC_LOCKED:
|
||||
return VI_ERROR_RSRC_LOCKED_MESSAGE;
|
||||
case VI_ERROR_RSRC_NFOUND:
|
||||
return VI_ERROR_RSRC_NFOUND_MESSAGE;
|
||||
case VI_ERROR_INV_RSRC_NAME:
|
||||
return VI_ERROR_INV_RSRC_NAME_MESSAGE;
|
||||
case VI_ERROR_QUEUE_OVERFLOW:
|
||||
return VI_ERROR_QUEUE_OVERFLOW_MESSAGE;
|
||||
case VI_ERROR_IO:
|
||||
return VI_ERROR_IO_MESSAGE;
|
||||
case VI_ERROR_ASRL_PARITY:
|
||||
return VI_ERROR_ASRL_PARITY_MESSAGE;
|
||||
case VI_ERROR_ASRL_FRAMING:
|
||||
return VI_ERROR_ASRL_FRAMING_MESSAGE;
|
||||
case VI_ERROR_ASRL_OVERRUN:
|
||||
return VI_ERROR_ASRL_OVERRUN_MESSAGE;
|
||||
case VI_ERROR_RSRC_BUSY:
|
||||
return VI_ERROR_RSRC_BUSY_MESSAGE;
|
||||
case VI_ERROR_INV_PARAMETER:
|
||||
return VI_ERROR_INV_PARAMETER_MESSAGE;
|
||||
default:
|
||||
return "Unknown error status";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user