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

@@ -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"