Added brace comments (#670)

Enforced by wpilibsuite/styleguide#80.
This commit is contained in:
Tyler Veness
2017-10-16 19:56:08 -07:00
committed by Peter Johnson
parent 877a9eae1f
commit f4779379c3
81 changed files with 85 additions and 85 deletions

View File

@@ -46,4 +46,4 @@ void HAL_CAN_GetCANStatus(float* percentBusUtilization, uint32_t* busOffCount,
percentBusUtilization, busOffCount, txFullCount, receiveErrorCount,
transmitErrorCount, status);
}
}
} // extern "C"

View File

@@ -24,5 +24,5 @@ double HAL_GetAccelerometerX(void);
double HAL_GetAccelerometerY(void);
double HAL_GetAccelerometerZ(void);
#ifdef __cplusplus
}
} // extern "C"
#endif

View File

@@ -32,5 +32,5 @@ int64_t HAL_GetAccumulatorCount(HAL_AnalogInputHandle analogPortHandle,
void HAL_GetAccumulatorOutput(HAL_AnalogInputHandle analogPortHandle,
int64_t* value, int64_t* count, int32_t* status);
#ifdef __cplusplus
}
} // extern "C"
#endif

View File

@@ -34,5 +34,5 @@ double HAL_GetAnalogGyroRate(HAL_GyroHandle handle, int32_t* status);
double HAL_GetAnalogGyroOffset(HAL_GyroHandle handle, int32_t* status);
int32_t HAL_GetAnalogGyroCenter(HAL_GyroHandle handle, int32_t* status);
#ifdef __cplusplus
}
} // extern "C"
#endif

View File

@@ -46,5 +46,5 @@ int32_t HAL_GetAnalogLSBWeight(HAL_AnalogInputHandle analogPortHandle,
int32_t HAL_GetAnalogOffset(HAL_AnalogInputHandle analogPortHandle,
int32_t* status);
#ifdef __cplusplus
}
} // extern "C"
#endif

View File

@@ -24,5 +24,5 @@ double HAL_GetAnalogOutput(HAL_AnalogOutputHandle analogOutputHandle,
int32_t* status);
HAL_Bool HAL_CheckAnalogOutputChannel(int32_t channel);
#ifdef __cplusplus
}
} // extern "C"
#endif

View File

@@ -43,5 +43,5 @@ HAL_Bool HAL_GetAnalogTriggerOutput(HAL_AnalogTriggerHandle analogTriggerHandle,
HAL_AnalogTriggerType type,
int32_t* status);
#ifdef __cplusplus
}
} // extern "C"
#endif

View File

@@ -56,5 +56,5 @@ void HAL_CAN_GetCANStatus(float* percentBusUtilization, uint32_t* busOffCount,
uint32_t* transmitErrorCount, int32_t* status);
#ifdef __cplusplus
}
} // extern "C"
#endif

View File

@@ -44,5 +44,5 @@ HAL_Bool HAL_GetCompressorNotConnectedStickyFault(
HAL_Bool HAL_GetCompressorNotConnectedFault(
HAL_CompressorHandle compressorHandle, int32_t* status);
#ifdef __cplusplus
}
} // extern "C"
#endif

View File

@@ -15,5 +15,5 @@ extern "C" {
int32_t HAL_GetSystemClockTicksPerMicrosecond(void);
#ifdef __cplusplus
}
} // extern "C"
#endif

View File

@@ -69,5 +69,5 @@ HAL_Bool HAL_GetCounterDirection(HAL_CounterHandle counterHandle,
void HAL_SetCounterReverseDirection(HAL_CounterHandle counterHandle,
HAL_Bool reverseDirection, int32_t* status);
#ifdef __cplusplus
}
} // extern "C"
#endif

View File

@@ -41,5 +41,5 @@ int32_t HAL_GetFilterSelect(HAL_DigitalHandle dioPortHandle, int32_t* status);
void HAL_SetFilterPeriod(int32_t filterIndex, int64_t value, int32_t* status);
int64_t HAL_GetFilterPeriod(int32_t filterIndex, int32_t* status);
#ifdef __cplusplus
}
} // extern "C"
#endif

View File

@@ -75,5 +75,5 @@ double HAL_GetEncoderDistancePerPulse(HAL_EncoderHandle encoderHandle,
HAL_EncoderEncodingType HAL_GetEncoderEncodingType(
HAL_EncoderHandle encoderHandle, int32_t* status);
#ifdef __cplusplus
}
} // extern "C"
#endif

View File

@@ -82,5 +82,5 @@ int64_t HAL_Report(int32_t resource, int32_t instanceNumber, int32_t context,
#endif // HAL_USE_LABVIEW
#ifdef __cplusplus
}
} // extern "C"
#endif

View File

@@ -25,5 +25,5 @@ int32_t HAL_ReadI2C(HAL_I2CPort port, int32_t deviceAddress, uint8_t* buffer,
int32_t count);
void HAL_CloseI2C(HAL_I2CPort port);
#ifdef __cplusplus
}
} // extern "C"
#endif

View File

@@ -46,5 +46,5 @@ void HAL_SetInterruptUpSourceEdge(HAL_InterruptHandle interruptHandle,
HAL_Bool risingEdge, HAL_Bool fallingEdge,
int32_t* status);
#ifdef __cplusplus
}
} // extern "C"
#endif

View File

@@ -26,5 +26,5 @@ void HAL_UpdateNotifierAlarm(HAL_NotifierHandle notifierHandle,
uint64_t triggerTime, int32_t* status);
void HAL_StopNotifierAlarm(HAL_NotifierHandle notifierHandle, int32_t* status);
#ifdef __cplusplus
}
} // extern "C"
#endif

View File

@@ -46,5 +46,5 @@ void HAL_FlushOSSerial(HAL_SerialPort port, int32_t* status);
void HAL_ClearOSSerial(HAL_SerialPort port, int32_t* status);
void HAL_CloseOSSerial(HAL_SerialPort port, int32_t* status);
#ifdef __cplusplus
}
} // extern "C"
#endif

View File

@@ -28,5 +28,5 @@ double HAL_GetPDPTotalEnergy(int32_t module, int32_t* status);
void HAL_ResetPDPTotalEnergy(int32_t module, int32_t* status);
void HAL_ClearPDPStickyFaults(int32_t module, int32_t* status);
#ifdef __cplusplus
}
} // extern "C"
#endif

View File

@@ -51,5 +51,5 @@ void HAL_SetPWMPeriodScale(HAL_DigitalHandle pwmPortHandle, int32_t squelchMask,
int32_t* status);
int32_t HAL_GetLoopTiming(int32_t* status);
#ifdef __cplusplus
}
} // extern "C"
#endif

View File

@@ -32,5 +32,5 @@ int32_t HAL_GetNumSolenoidChannels(void);
int32_t HAL_GetNumPDPModules(void);
int32_t HAL_GetNumPDPChannels(void);
#ifdef __cplusplus
}
} // extern "C"
#endif

View File

@@ -30,5 +30,5 @@ double HAL_GetUserCurrent3V3(int32_t* status);
HAL_Bool HAL_GetUserActive3V3(int32_t* status);
int32_t HAL_GetUserCurrentFaults3V3(int32_t* status);
#ifdef __cplusplus
}
} // extern "C"
#endif

View File

@@ -25,5 +25,5 @@ void HAL_SetRelay(HAL_RelayHandle relayPortHandle, HAL_Bool on,
int32_t* status);
HAL_Bool HAL_GetRelay(HAL_RelayHandle relayPortHandle, int32_t* status);
#ifdef __cplusplus
}
} // extern "C"
#endif

View File

@@ -55,5 +55,5 @@ double HAL_GetSPIAccumulatorAverage(HAL_SPIPort port, int32_t* status);
void HAL_GetSPIAccumulatorOutput(HAL_SPIPort port, int64_t* value,
int64_t* count, int32_t* status);
#ifdef __cplusplus
}
} // extern "C"
#endif

View File

@@ -46,5 +46,5 @@ void HAL_FlushSerial(HAL_SerialPort port, int32_t* status);
void HAL_ClearSerial(HAL_SerialPort port, int32_t* status);
void HAL_CloseSerial(HAL_SerialPort port, int32_t* status);
#ifdef __cplusplus
}
} // extern "C"
#endif

View File

@@ -31,5 +31,5 @@ HAL_Bool HAL_GetPCMSolenoidVoltageStickyFault(int32_t module, int32_t* status);
HAL_Bool HAL_GetPCMSolenoidVoltageFault(int32_t module, int32_t* status);
void HAL_ClearAllPCMStickyFaults(int32_t module, int32_t* status);
#ifdef __cplusplus
}
} // extern "C"
#endif

View File

@@ -25,4 +25,4 @@ HAL_Bool HAL_SetThreadPriority(NativeThreadHandle handle, HAL_Bool realTime,
int32_t priority, int32_t* status);
HAL_Bool HAL_SetCurrentThreadPriority(HAL_Bool realTime, int32_t priority,
int32_t* status);
}
} // extern "C"

View File

@@ -12,4 +12,4 @@
extern "C" {
HAL_NotifierHandle HAL_InitializeNotifierNonThreadedUnsafe(
HAL_NotifierProcessFunction process, void* param, int32_t* status);
}
} // extern "C"

View File

@@ -56,5 +56,5 @@ double HALSIM_GetAccelerometerZ(int32_t index);
void HALSIM_SetAccelerometerZ(int32_t index, double z);
#ifdef __cplusplus
}
} // extern "C"
#endif

View File

@@ -39,5 +39,5 @@ HAL_Bool HALSIM_GetAnalogGyroInitialized(int32_t index);
void HALSIM_SetAnalogGyroInitialized(int32_t index, HAL_Bool initialized);
#ifdef __cplusplus
}
} // extern "C"
#endif

View File

@@ -89,5 +89,5 @@ void HALSIM_SetAnalogInAccumulatorDeadband(int32_t index,
int32_t accumulatorDeadband);
#ifdef __cplusplus
}
} // extern "C"
#endif

View File

@@ -32,5 +32,5 @@ HAL_Bool HALSIM_GetAnalogOutInitialized(int32_t index);
void HALSIM_SetAnalogOutInitialized(int32_t index, HAL_Bool initialized);
#ifdef __cplusplus
}
} // extern "C"
#endif

View File

@@ -55,5 +55,5 @@ void HALSIM_SetAnalogTriggerTriggerMode(int32_t index,
HALSIM_AnalogTriggerMode triggerMode);
#ifdef __cplusplus
}
} // extern "C"
#endif

View File

@@ -54,5 +54,5 @@ int32_t HALSIM_GetDIOFilterIndex(int32_t index);
void HALSIM_SetDIOFilterIndex(int32_t index, int32_t filterIndex);
#ifdef __cplusplus
}
} // extern "C"
#endif

View File

@@ -39,5 +39,5 @@ int32_t HALSIM_GetDigitalPWMPin(int32_t index);
void HALSIM_SetDigitalPWMPin(int32_t index, int32_t pin);
#ifdef __cplusplus
}
} // extern "C"
#endif

View File

@@ -70,5 +70,5 @@ void HALSIM_SetDriverStationMatchTime(double matchTime);
void HALSIM_NotifyDriverStationNewData(void);
#ifdef __cplusplus
}
} // extern "C"
#endif

View File

@@ -79,5 +79,5 @@ int32_t HALSIM_GetEncoderSamplesToAverage(int32_t index);
void HALSIM_SetEncoderSamplesToAverage(int32_t index, int32_t samplesToAverage);
#ifdef __cplusplus
}
} // extern "C"
#endif

View File

@@ -11,4 +11,4 @@ extern "C" {
void HALSIM_WaitForProgramStart(void);
void HALSIM_SetProgramStarted(void);
void HALSIM_RestartTiming(void);
}
} // extern "C"

View File

@@ -75,5 +75,5 @@ double HALSIM_GetPCMCompressorCurrent(int32_t index);
void HALSIM_SetPCMCompressorCurrent(int32_t index, double compressorCurrent);
#ifdef __cplusplus
}
} // extern "C"
#endif

View File

@@ -47,5 +47,5 @@ double HALSIM_GetPDPCurrent(int32_t index, int32_t channel);
void HALSIM_SetPDPCurrent(int32_t index, int32_t channel, double current);
#ifdef __cplusplus
}
} // extern "C"
#endif

View File

@@ -61,5 +61,5 @@ HAL_Bool HALSIM_GetPWMZeroLatch(int32_t index);
void HALSIM_SetPWMZeroLatch(int32_t index, HAL_Bool zeroLatch);
#ifdef __cplusplus
}
} // extern "C"
#endif

View File

@@ -48,5 +48,5 @@ HAL_Bool HALSIM_GetRelayReverse(int32_t index);
void HALSIM_SetRelayReverse(int32_t index, HAL_Bool reverse);
#ifdef __cplusplus
}
} // extern "C"
#endif

View File

@@ -134,5 +134,5 @@ int32_t HALSIM_GetRoboRioUserFaults3V3(int32_t index);
void HALSIM_SetRoboRioUserFaults3V3(int32_t index, int32_t userFaults3V3);
#ifdef __cplusplus
}
} // extern "C"
#endif

View File

@@ -54,5 +54,5 @@ double HALSIM_GetSPIAccelerometerZ(int32_t index);
void HALSIM_SetSPIAccelerometerZ(int32_t index, double z);
#ifdef __cplusplus
}
} // extern "C"
#endif

View File

@@ -22,4 +22,4 @@ void HAL_SetAccelerometerRange(HAL_AccelerometerRange range) {
double HAL_GetAccelerometerX(void) { return SimAccelerometerData[0].GetX(); }
double HAL_GetAccelerometerY(void) { return SimAccelerometerData[0].GetY(); }
double HAL_GetAccelerometerZ(void) { return SimAccelerometerData[0].GetZ(); }
}
} // extern "C"

View File

@@ -103,4 +103,4 @@ void HAL_GetAccumulatorOutput(HAL_AnalogInputHandle analogPortHandle,
*count = SimAnalogInData[port->channel].GetAccumulatorCount();
*value = SimAnalogInData[port->channel].GetAccumulatorValue();
}
}
} // extern "C"

View File

@@ -21,7 +21,7 @@ struct AnalogGyro {
HAL_AnalogInputHandle handle;
uint8_t index;
};
}
} // namespace
using namespace hal;
@@ -132,4 +132,4 @@ double HAL_GetAnalogGyroOffset(HAL_GyroHandle handle, int32_t* status) {
int32_t HAL_GetAnalogGyroCenter(HAL_GyroHandle handle, int32_t* status) {
return 0;
}
}
} // extern "C"

View File

@@ -14,4 +14,4 @@ namespace hal {
IndexedHandleResource<HAL_AnalogInputHandle, hal::AnalogPort, kNumAnalogInputs,
HAL_HandleEnum::AnalogInput>
analogInputHandles;
}
} // namespace hal

View File

@@ -19,7 +19,7 @@ namespace {
struct AnalogOutput {
uint8_t channel;
};
}
} // namespace
static IndexedHandleResource<HAL_AnalogOutputHandle, AnalogOutput,
kNumAnalogOutputs, HAL_HandleEnum::AnalogOutput>
@@ -85,4 +85,4 @@ double HAL_GetAnalogOutput(HAL_AnalogOutputHandle analogOutputHandle,
return SimAnalogOutData[port->channel].GetVoltage();
}
}
} // extern "C"

View File

@@ -22,7 +22,7 @@ struct AnalogTrigger {
uint8_t index;
HAL_Bool trigState;
};
}
} // namespace
using namespace hal;

View File

@@ -25,4 +25,4 @@ void HAL_CAN_ReadStreamSession(uint32_t sessionHandle,
void HAL_CAN_GetCANStatus(float* percentBusUtilization, uint32_t* busOffCount,
uint32_t* txFullCount, uint32_t* receiveErrorCount,
uint32_t* transmitErrorCount, int32_t* status) {}
}
} // extern "C"

View File

@@ -15,4 +15,4 @@ extern "C" {
int32_t HAL_GetSystemClockTicksPerMicrosecond(void) {
return kSystemClockTicksPerMicrosecond;
}
}
} // extern "C"

View File

@@ -11,4 +11,4 @@
namespace hal {
constexpr int32_t kSystemClockTicksPerMicrosecond = 40;
}
} // namespace hal

View File

@@ -18,7 +18,7 @@ namespace hal {
LimitedHandleResource<HAL_CounterHandle, Counter, kNumCounters,
HAL_HandleEnum::Counter>
counterHandles;
}
} // namespace hal
extern "C" {
HAL_CounterHandle HAL_InitializeCounter(HAL_Counter_Mode mode, int32_t* index,
@@ -83,4 +83,4 @@ HAL_Bool HAL_GetCounterDirection(HAL_CounterHandle counterHandle,
void HAL_SetCounterReverseDirection(HAL_CounterHandle counterHandle,
HAL_Bool reverseDirection,
int32_t* status) {}
}
} // extern "C"

View File

@@ -333,4 +333,4 @@ void HAL_SetFilterPeriod(int32_t filterIndex, int64_t value, int32_t* status) {
int64_t HAL_GetFilterPeriod(int32_t filterIndex, int32_t* status) {
return 0; // TODO(Thad) figure this out
}
}
} // extern "C"

View File

@@ -25,7 +25,7 @@ struct Encoder {
uint8_t index;
};
struct Empty {};
}
} // namespace
static LimitedHandleResource<HAL_EncoderHandle, Encoder,
kNumEncoders + kNumCounters,

View File

@@ -23,4 +23,4 @@ int32_t HAL_ReadI2C(HAL_I2CPort port, int32_t deviceAddress, uint8_t* buffer,
return 0;
}
void HAL_CloseI2C(HAL_I2CPort port) {}
}
} // extern "C"

View File

@@ -309,4 +309,4 @@ double HALSIM_GetAccelerometerZ(int32_t index) {
void HALSIM_SetAccelerometerZ(int32_t index, double z) {
SimAccelerometerData[index].SetZ(z);
}
}
} // extern "C"

View File

@@ -192,4 +192,4 @@ HAL_Bool HALSIM_GetAnalogGyroInitialized(int32_t index) {
void HALSIM_SetAnalogGyroInitialized(int32_t index, HAL_Bool initialized) {
SimAnalogGyroData[index].SetInitialized(initialized);
}
}
} // extern "C"

View File

@@ -550,4 +550,4 @@ void HALSIM_SetAnalogInAccumulatorDeadband(int32_t index,
int32_t accumulatorDeadband) {
SimAnalogInData[index].SetAccumulatorDeadband(accumulatorDeadband);
}
}
} // extern "C"

View File

@@ -135,4 +135,4 @@ HAL_Bool HALSIM_GetAnalogOutInitialized(int32_t index) {
void HALSIM_SetAnalogOutInitialized(int32_t index, HAL_Bool initialized) {
SimAnalogOutData[index].SetInitialized(initialized);
}
}
} // extern "C"

View File

@@ -254,4 +254,4 @@ void HALSIM_SetAnalogTriggerTriggerMode(int32_t index,
HALSIM_AnalogTriggerMode triggerMode) {
SimAnalogTriggerData[index].SetTriggerMode(triggerMode);
}
}
} // extern "C"

View File

@@ -303,4 +303,4 @@ int32_t HALSIM_GetDIOFilterIndex(int32_t index) {
void HALSIM_SetDIOFilterIndex(int32_t index, int32_t filterIndex) {
SimDIOData[index].SetFilterIndex(filterIndex);
}
}
} // extern "C"

View File

@@ -192,4 +192,4 @@ int32_t HALSIM_GetDigitalPWMPin(int32_t index) {
void HALSIM_SetDigitalPWMPin(int32_t index, int32_t pin) {
SimDigitalPWMData[index].SetPin(pin);
}
}
} // extern "C"

View File

@@ -485,4 +485,4 @@ void HALSIM_SetEncoderSamplesToAverage(int32_t index,
int32_t samplesToAverage) {
SimEncoderData[index].SetSamplesToAverage(samplesToAverage);
}
}
} // extern "C"

View File

@@ -448,4 +448,4 @@ double HALSIM_GetPCMCompressorCurrent(int32_t index) {
void HALSIM_SetPCMCompressorCurrent(int32_t index, double compressorCurrent) {
SimPCMData[index].SetCompressorCurrent(compressorCurrent);
}
}
} // extern "C"

View File

@@ -250,4 +250,4 @@ double HALSIM_GetPDPCurrent(int32_t index, int32_t channel) {
void HALSIM_SetPDPCurrent(int32_t index, int32_t channel, double current) {
SimPDPData[index].SetCurrent(channel, current);
}
}
} // extern "C"

View File

@@ -361,4 +361,4 @@ HAL_Bool HALSIM_GetPWMZeroLatch(int32_t index) {
void HALSIM_SetPWMZeroLatch(int32_t index, HAL_Bool zeroLatch) {
SimPWMData[index].SetZeroLatch(zeroLatch);
}
}
} // extern "C"

View File

@@ -251,4 +251,4 @@ HAL_Bool HALSIM_GetRelayReverse(int32_t index) {
void HALSIM_SetRelayReverse(int32_t index, HAL_Bool reverse) {
SimRelayData[index].SetReverse(reverse);
}
}
} // extern "C"

View File

@@ -887,4 +887,4 @@ int32_t HALSIM_GetRoboRioUserFaults3V3(int32_t index) {
void HALSIM_SetRoboRioUserFaults3V3(int32_t index, int32_t userFaults3V3) {
SimRoboRioData[index].SetUserFaults3V3(userFaults3V3);
}
}
} // extern "C"

View File

@@ -306,4 +306,4 @@ double HALSIM_GetSPIAccelerometerZ(int32_t index) {
void HALSIM_SetSPIAccelerometerZ(int32_t index, double z) {
SimSPIAccelerometerData[index].SetZ(z);
}
}
} // extern "C"

View File

@@ -51,4 +51,4 @@ void HALSIM_WaitForProgramStart(void) {
void HALSIM_SetProgramStarted(void) { SetProgramStarted(); }
void HALSIM_RestartTiming(void) { RestartTiming(); }
}
} // extern "C"

View File

@@ -19,4 +19,4 @@ int64_t GetFPGATime();
double GetFPGATimestamp();
void SetProgramStarted();
}
} // namespace hal

View File

@@ -44,4 +44,4 @@ int32_t HAL_WriteOSSerial(HAL_SerialPort port, const char* buffer,
void HAL_FlushOSSerial(HAL_SerialPort port, int32_t* status) {}
void HAL_ClearOSSerial(HAL_SerialPort port, int32_t* status) {}
void HAL_CloseOSSerial(HAL_SerialPort port, int32_t* status) {}
}
} // extern "C"

View File

@@ -38,4 +38,4 @@ double HAL_GetPDPTotalPower(int32_t module, int32_t* status) { return 0.0; }
double HAL_GetPDPTotalEnergy(int32_t module, int32_t* status) { return 0.0; }
void HAL_ResetPDPTotalEnergy(int32_t module, int32_t* status) {}
void HAL_ClearPDPStickyFaults(int32_t module, int32_t* status) {}
}
} // extern "C"

View File

@@ -31,4 +31,4 @@ int32_t HAL_GetNumSolenoidChannels(void) { return kNumSolenoidChannels; }
int32_t HAL_GetNumPDPModules(void) { return kNumPDPModules; }
int32_t HAL_GetNumPDPChannels(void) { return kNumPDPChannels; }
int32_t HAL_GetNumCanTalons(void) { return kNumCanTalons; }
}
} // extern "C"

View File

@@ -18,7 +18,7 @@ struct Relay {
uint8_t channel;
bool fwd;
};
}
} // namespace
static IndexedHandleResource<HAL_RelayHandle, Relay, kNumRelayChannels,
HAL_HandleEnum::Relay>

View File

@@ -61,4 +61,4 @@ void HAL_FlushSerial(HAL_SerialPort port, int32_t* status) {}
void HAL_ClearSerial(HAL_SerialPort port, int32_t* status) {}
void HAL_CloseSerial(HAL_SerialPort port, int32_t* status) {}
}
} // extern "C"

View File

@@ -18,7 +18,7 @@ struct Solenoid {
uint8_t module;
uint8_t channel;
};
}
} // namespace
using namespace hal;
@@ -117,4 +117,4 @@ HAL_Bool HAL_GetPCMSolenoidVoltageFault(int32_t module, int32_t* status) {
return 0;
}
void HAL_ClearAllPCMStickyFaults(int32_t module, int32_t* status) {}
}
} // extern "C"