artf4107: Uniform initialization syntax introduced

Change-Id: I452b4794d757a0817589ec62b75eda7fbdd74904
This commit is contained in:
Tyler Veness
2015-06-24 01:06:29 -07:00
parent b1befed14f
commit 368ad30d37
179 changed files with 379 additions and 831 deletions

View File

@@ -19,10 +19,6 @@
wpi_setImaqErrorWithContext(error, #funName); \
}
// Constants for the manual and auto types
static const std::string AUTO = "Auto";
static const std::string MANUAL = "Manual";
/**
* Helper function to determine the size of a jpeg. The general structure of
* how to parse a jpeg for length can be found in this stackoverflow article:
@@ -76,23 +72,8 @@ unsigned int USBCamera::GetJpegSize(void* buffer, unsigned int buffSize) {
}
USBCamera::USBCamera(std::string name, bool useJpeg)
: m_id(0),
m_name(name),
m_useJpeg(useJpeg),
m_active(false),
m_open(false),
m_mutex(),
m_width(320),
m_height(240),
m_fps(30),
m_whiteBalance(AUTO),
m_whiteBalanceValue(0),
m_whiteBalanceValuePresent(false),
m_exposure(MANUAL),
m_exposureValue(50),
m_exposureValuePresent(false),
m_brightness(80),
m_needSettingsUpdate(true) {}
: m_name(name),
m_useJpeg(useJpeg) {}
void USBCamera::OpenCamera() {
std::unique_lock<std::recursive_mutex> lock(m_mutex);
@@ -188,10 +169,10 @@ void USBCamera::UpdateSettings() {
if (m_whiteBalance.compare(AUTO) == 0) {
SAFE_IMAQ_CALL(IMAQdxSetAttribute, m_id, ATTR_WB_MODE,
IMAQdxValueTypeString, AUTO.c_str());
IMAQdxValueTypeString, AUTO);
} else {
SAFE_IMAQ_CALL(IMAQdxSetAttribute, m_id, ATTR_WB_MODE,
IMAQdxValueTypeString, MANUAL.c_str());
IMAQdxValueTypeString, MANUAL);
if (m_whiteBalanceValuePresent)
SAFE_IMAQ_CALL(IMAQdxSetAttribute, m_id, ATTR_WB_VALUE,
IMAQdxValueTypeU32, m_whiteBalanceValue);
@@ -203,7 +184,7 @@ void USBCamera::UpdateSettings() {
std::string("AutoAperaturePriority").c_str());
} else {
SAFE_IMAQ_CALL(IMAQdxSetAttribute, m_id, ATTR_EX_MODE,
IMAQdxValueTypeString, MANUAL.c_str());
IMAQdxValueTypeString, MANUAL);
if (m_exposureValuePresent) {
double minv = 0.0;
double maxv = 0.0;
@@ -218,7 +199,7 @@ void USBCamera::UpdateSettings() {
}
SAFE_IMAQ_CALL(IMAQdxSetAttribute, m_id, ATTR_BR_MODE, IMAQdxValueTypeString,
MANUAL.c_str());
MANUAL);
double minv = 0.0;
double maxv = 0.0;
SAFE_IMAQ_CALL(IMAQdxGetAttributeMinimum, m_id, ATTR_BR_VALUE,