mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-22 01:11:42 +00:00
Implements Better Error Messages from the HAL (#172)
* Makes the HAL provide a better error message for certain things. * Makes Java error messages better * Updates C++ errors. * Moves handles header folder to HAL directory
This commit is contained in:
committed by
Peter Johnson
parent
05c00430b3
commit
d2aa168f66
@@ -19,7 +19,8 @@ Compressor::Compressor(uint8_t pcmID) : m_module(pcmID) {
|
||||
int32_t status = 0;
|
||||
m_compressorHandle = HAL_InitializeCompressor(m_module, &status);
|
||||
if (status != 0) {
|
||||
wpi_setErrorWithContext(status, HAL_GetErrorMessage(status));
|
||||
wpi_setErrorWithContextRange(status, 0, HAL_GetNumPCMModules(), pcmID,
|
||||
HAL_GetErrorMessage(status));
|
||||
return;
|
||||
}
|
||||
SetClosedLoopControl(true);
|
||||
|
||||
Reference in New Issue
Block a user