mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-29 02:21:44 +00:00
[wpilib] Use misspell to fix spelling errors (NFC) (#2674)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2016-2018 FIRST. All Rights Reserved. */
|
||||
/* Copyright (c) 2016-2020 FIRST. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
||||
/* the project. */
|
||||
@@ -176,7 +176,7 @@ static uint8_t readRegister(Register reg) {
|
||||
* 1 g-force, taking into account the accelerometer range.
|
||||
*/
|
||||
static double unpackAxis(int16_t raw) {
|
||||
// The raw value is actually 12 bits, not 16, so we need to propogate the
|
||||
// The raw value is actually 12 bits, not 16, so we need to propagate the
|
||||
// 2's complement sign bit to the unused 4 bits for this to work with
|
||||
// negative numbers.
|
||||
raw <<= 4;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2016-2019 FIRST. All Rights Reserved. */
|
||||
/* Copyright (c) 2016-2020 FIRST. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
||||
/* the project. */
|
||||
@@ -93,7 +93,7 @@ void setAnalogSampleRate(double samplesPerSecond, int32_t* status) {
|
||||
config.ConvertRate = ticksPerConversion;
|
||||
analogInputSystem->writeConfig(config, status);
|
||||
|
||||
// Indicate that the scan size has been commited to hardware.
|
||||
// Indicate that the scan size has been committed to hardware.
|
||||
setAnalogNumChannelsToActivate(0);
|
||||
}
|
||||
|
||||
|
||||
@@ -334,7 +334,7 @@ static bool killExistingProgram(int timeout, int mode) {
|
||||
kill(pid, SIGTERM); // try to kill it
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(timeout));
|
||||
if (kill(pid, 0) == 0) {
|
||||
// still not successfull
|
||||
// still not successful
|
||||
wpi::outs() << "FRC pid " << pid << " did not die within " << timeout
|
||||
<< "ms. Force killing with kill -9\n";
|
||||
// Force kill -9
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2016-2019 FIRST. All Rights Reserved. */
|
||||
/* Copyright (c) 2016-2020 FIRST. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
||||
/* the project. */
|
||||
@@ -88,8 +88,8 @@ void HAL_FreeRelayPort(HAL_RelayHandle relayPortHandle) {
|
||||
|
||||
HAL_Bool HAL_CheckRelayChannel(int32_t channel) {
|
||||
// roboRIO only has 4 headers, and the FPGA has
|
||||
// seperate functions for forward and reverse,
|
||||
// instead of seperate channel IDs
|
||||
// separate functions for forward and reverse,
|
||||
// instead of separate channel IDs
|
||||
return channel < kNumRelayHeaders && channel >= 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2016-2019 FIRST. All Rights Reserved. */
|
||||
/* Copyright (c) 2016-2020 FIRST. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
||||
/* the project. */
|
||||
@@ -199,7 +199,7 @@ void SerialHelper::QueryHubPaths(int32_t* status) {
|
||||
|
||||
*status = viGetAttribute(vSession, VI_ATTR_INTF_INST_NAME, &osName);
|
||||
// Ignore an error here, as we want to close the session on an error
|
||||
// Use a seperate close variable so we can check
|
||||
// Use a separate close variable so we can check
|
||||
ViStatus closeStatus = viClose(vSession);
|
||||
if (*status < 0) goto done;
|
||||
if (closeStatus < 0) goto done;
|
||||
|
||||
@@ -57,7 +57,7 @@ public:
|
||||
|
||||
/* Get compressor state
|
||||
* @Return - CTR_Code - Error code (if any)
|
||||
* @Param - status - True if compress ouput is on, false if otherwise
|
||||
* @Param - status - True if compress output is on, false if otherwise
|
||||
*/
|
||||
CTR_Code GetCompressor(bool &status);
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace hal {
|
||||
/**
|
||||
* The DigitalHandleResource class is a way to track handles. This version
|
||||
* allows a limited number of handles that are allocated by index.
|
||||
* The enum value is seperate, as 2 enum values are allowed per handle
|
||||
* The enum value is separate, as 2 enum values are allowed per handle
|
||||
* Because they are allocated by index, each individual index holds its own
|
||||
* mutex, which reduces contention heavily.]
|
||||
*
|
||||
@@ -57,7 +57,7 @@ class DigitalHandleResource : public HandleBase {
|
||||
template <typename THandle, typename TStruct, int16_t size>
|
||||
THandle DigitalHandleResource<THandle, TStruct, size>::Allocate(
|
||||
int16_t index, HAL_HandleEnum enumValue, int32_t* status) {
|
||||
// don't aquire the lock if we can fail early.
|
||||
// don't acquire the lock if we can fail early.
|
||||
if (index < 0 || index >= size) {
|
||||
*status = RESOURCE_OUT_OF_RANGE;
|
||||
return HAL_kInvalidHandle;
|
||||
@@ -81,7 +81,7 @@ std::shared_ptr<TStruct> DigitalHandleResource<THandle, TStruct, size>::Get(
|
||||
return nullptr;
|
||||
}
|
||||
std::scoped_lock lock(m_handleMutexes[index]);
|
||||
// return structure. Null will propogate correctly, so no need to manually
|
||||
// return structure. Null will propagate correctly, so no need to manually
|
||||
// check.
|
||||
return m_structures[index];
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ template <typename THandle, typename TStruct, int16_t size,
|
||||
THandle
|
||||
IndexedClassedHandleResource<THandle, TStruct, size, enumValue>::Allocate(
|
||||
int16_t index, std::shared_ptr<TStruct> toSet, int32_t* status) {
|
||||
// don't aquire the lock if we can fail early.
|
||||
// don't acquire the lock if we can fail early.
|
||||
if (index < 0 || index >= size) {
|
||||
*status = RESOURCE_OUT_OF_RANGE;
|
||||
return HAL_kInvalidHandle;
|
||||
@@ -90,7 +90,7 @@ IndexedClassedHandleResource<THandle, TStruct, size, enumValue>::Get(
|
||||
return nullptr;
|
||||
}
|
||||
std::scoped_lock lock(m_handleMutexes[index]);
|
||||
// return structure. Null will propogate correctly, so no need to manually
|
||||
// return structure. Null will propagate correctly, so no need to manually
|
||||
// check.
|
||||
return m_structures[index];
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ template <typename THandle, typename TStruct, int16_t size,
|
||||
HAL_HandleEnum enumValue>
|
||||
THandle IndexedHandleResource<THandle, TStruct, size, enumValue>::Allocate(
|
||||
int16_t index, int32_t* status) {
|
||||
// don't aquire the lock if we can fail early.
|
||||
// don't acquire the lock if we can fail early.
|
||||
if (index < 0 || index >= size) {
|
||||
*status = RESOURCE_OUT_OF_RANGE;
|
||||
return HAL_kInvalidHandle;
|
||||
@@ -84,7 +84,7 @@ IndexedHandleResource<THandle, TStruct, size, enumValue>::Get(THandle handle) {
|
||||
return nullptr;
|
||||
}
|
||||
std::scoped_lock lock(m_handleMutexes[index]);
|
||||
// return structure. Null will propogate correctly, so no need to manually
|
||||
// return structure. Null will propagate correctly, so no need to manually
|
||||
// check.
|
||||
return m_structures[index];
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ LimitedClassedHandleResource<THandle, TStruct, size, enumValue>::Get(
|
||||
return nullptr;
|
||||
}
|
||||
std::scoped_lock lock(m_handleMutexes[index]);
|
||||
// return structure. Null will propogate correctly, so no need to manually
|
||||
// return structure. Null will propagate correctly, so no need to manually
|
||||
// check.
|
||||
return m_structures[index];
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ LimitedHandleResource<THandle, TStruct, size, enumValue>::Get(THandle handle) {
|
||||
return nullptr;
|
||||
}
|
||||
std::scoped_lock lock(m_handleMutexes[index]);
|
||||
// return structure. Null will propogate correctly, so no need to manually
|
||||
// return structure. Null will propagate correctly, so no need to manually
|
||||
// check.
|
||||
return m_structures[index];
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2016-2018 FIRST. All Rights Reserved. */
|
||||
/* Copyright (c) 2016-2020 FIRST. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
||||
/* the project. */
|
||||
@@ -89,8 +89,8 @@ void HAL_FreeRelayPort(HAL_RelayHandle relayPortHandle) {
|
||||
|
||||
HAL_Bool HAL_CheckRelayChannel(int32_t channel) {
|
||||
// roboRIO only has 4 headers, and the FPGA has
|
||||
// seperate functions for forward and reverse,
|
||||
// instead of seperate channel IDs
|
||||
// separate functions for forward and reverse,
|
||||
// instead of separate channel IDs
|
||||
return channel < kNumRelayHeaders && channel >= 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user