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

@@ -51,7 +51,7 @@ class ADXL345_I2C : public Accelerometer,
public:
explicit ADXL345_I2C(Port port, Range range = kRange_2G);
virtual ~ADXL345_I2C();
virtual ~ADXL345_I2C() = default;
// Accelerometer interface
virtual void SetRange(Range range) override;
@@ -69,8 +69,6 @@ class ADXL345_I2C : public Accelerometer,
virtual void StartLiveWindowMode() override {}
virtual void StopLiveWindowMode() override {}
protected:
// I2C* m_i2c;
private:
ITable *m_table;
};

View File

@@ -43,9 +43,9 @@ class AnalogAccelerometer : public SensorBase,
void InitAccelerometer();
AnalogInput *m_AnalogInput;
float m_voltsPerG;
float m_zeroGVoltage;
float m_voltsPerG = 1.0;
float m_zeroGVoltage = 2.5;
bool m_allocatedChannel;
ITable *m_table;
ITable *m_table = nullptr;
};

View File

@@ -80,5 +80,5 @@ class AnalogInput : public SensorBase,
void *m_port;
int64_t m_accumulatorOffset;
ITable *m_table;
ITable *m_table = nullptr;
};

View File

@@ -34,5 +34,5 @@ class AnalogOutput : public SensorBase, public LiveWindowSendable {
uint32_t m_channel;
void *m_port;
ITable *m_table;
ITable *m_table = nullptr;
};

View File

@@ -19,7 +19,7 @@ class BuiltInAccelerometer : public Accelerometer,
public LiveWindowSendable {
public:
BuiltInAccelerometer(Range range = kRange_8G);
virtual ~BuiltInAccelerometer();
virtual ~BuiltInAccelerometer() = default;
// Accelerometer interface
virtual void SetRange(Range range) override;
@@ -35,5 +35,5 @@ class BuiltInAccelerometer : public Accelerometer,
virtual void StopLiveWindowMode() override {}
private:
ITable *m_table;
ITable *m_table = nullptr;
};

View File

@@ -16,6 +16,7 @@
#include "LiveWindow/LiveWindowSendable.h"
#include "tables/ITable.h"
#include "NetworkCommunication/CANSessionMux.h"
#include "CAN/can_proto.h"
#include <atomic>
#include <mutex>
@@ -170,64 +171,64 @@ class CANJaguar : public MotorSafety,
mutable std::recursive_mutex m_mutex;
uint8_t m_deviceNumber;
float m_value;
float m_value = 0.0f;
// Parameters/configuration
ControlMode m_controlMode;
uint8_t m_speedReference;
uint8_t m_positionReference;
double m_p;
double m_i;
double m_d;
NeutralMode m_neutralMode;
uint16_t m_encoderCodesPerRev;
uint16_t m_potentiometerTurns;
LimitMode m_limitMode;
double m_forwardLimit;
double m_reverseLimit;
double m_maxOutputVoltage;
double m_voltageRampRate;
float m_faultTime;
uint8_t m_speedReference = LM_REF_NONE;
uint8_t m_positionReference = LM_REF_NONE;
double m_p = 0.0;
double m_i = 0.0;
double m_d = 0.0;
NeutralMode m_neutralMode = kNeutralMode_Jumper;
uint16_t m_encoderCodesPerRev = 0;
uint16_t m_potentiometerTurns = 0;
LimitMode m_limitMode = kLimitMode_SwitchInputsOnly;
double m_forwardLimit = 0.0;
double m_reverseLimit = 0.0;
double m_maxOutputVoltage = 30.0;
double m_voltageRampRate = 0.0;
float m_faultTime = 0.0f;
// Which parameters have been verified since they were last set?
bool m_controlModeVerified;
bool m_speedRefVerified;
bool m_posRefVerified;
bool m_pVerified;
bool m_iVerified;
bool m_dVerified;
bool m_neutralModeVerified;
bool m_encoderCodesPerRevVerified;
bool m_potentiometerTurnsVerified;
bool m_forwardLimitVerified;
bool m_reverseLimitVerified;
bool m_limitModeVerified;
bool m_maxOutputVoltageVerified;
bool m_voltageRampRateVerified;
bool m_faultTimeVerified;
bool m_controlModeVerified = false; // Needs to be verified because it's set in the constructor
bool m_speedRefVerified = true;
bool m_posRefVerified = true;
bool m_pVerified = true;
bool m_iVerified = true;
bool m_dVerified = true;
bool m_neutralModeVerified = true;
bool m_encoderCodesPerRevVerified = true;
bool m_potentiometerTurnsVerified = true;
bool m_forwardLimitVerified = true;
bool m_reverseLimitVerified = true;
bool m_limitModeVerified = true;
bool m_maxOutputVoltageVerified = true;
bool m_voltageRampRateVerified = true;
bool m_faultTimeVerified = true;
// Status data
mutable float m_busVoltage;
mutable float m_outputVoltage;
mutable float m_outputCurrent;
mutable float m_temperature;
mutable double m_position;
mutable double m_speed;
mutable uint8_t m_limits;
mutable uint16_t m_faults;
uint32_t m_firmwareVersion;
uint8_t m_hardwareVersion;
mutable float m_busVoltage = 0.0f;
mutable float m_outputVoltage = 0.0f;
mutable float m_outputCurrent = 0.0f;
mutable float m_temperature = 0.0f;
mutable double m_position = 0.0;
mutable double m_speed = 0.0;
mutable uint8_t m_limits = 0x00;
mutable uint16_t m_faults = 0x0000;
uint32_t m_firmwareVersion = 0;
uint8_t m_hardwareVersion = 0;
// Which periodic status messages have we received at least once?
mutable std::atomic<bool> m_receivedStatusMessage0;
mutable std::atomic<bool> m_receivedStatusMessage1;
mutable std::atomic<bool> m_receivedStatusMessage2;
mutable std::atomic<bool> m_receivedStatusMessage0{false};
mutable std::atomic<bool> m_receivedStatusMessage1{false};
mutable std::atomic<bool> m_receivedStatusMessage2{false};
bool m_controlEnabled;
void verify();
MotorSafetyHelper *m_safetyHelper;
MotorSafetyHelper *m_safetyHelper = nullptr;
void ValueChanged(ITable *source, const std::string &key, EntryValue value,
bool isNew) override;
@@ -238,9 +239,9 @@ class CANJaguar : public MotorSafety,
void InitTable(ITable *subTable) override;
ITable *GetTable() const override;
ITable *m_table;
ITable *m_table = nullptr;
private:
void InitCANJaguar();
bool m_isInverted;
bool m_isInverted = false;
};

View File

@@ -183,14 +183,14 @@ class CANTalon : public MotorSafety,
int m_deviceNumber;
CanTalonSRX *m_impl;
MotorSafetyHelper *m_safetyHelper;
int m_profile; // Profile from CANTalon to use. Set to zero until we can
// actually test this.
int m_profile = 0; // Profile from CANTalon to use. Set to zero until we can
// actually test this.
bool m_controlEnabled;
ControlMode m_controlMode;
bool m_controlEnabled = true;
ControlMode m_controlMode = kPercentVbus;
TalonControlMode m_sendMode;
double m_setPoint;
double m_setPoint = 0;
static const unsigned int kDelayForSolicitedSignalsUs = 4000;
/**
* Fixup the sendMode so Set() serializes the correct demand value.

View File

@@ -19,9 +19,9 @@ class Compressor : public SensorBase,
public LiveWindowSendable,
public ITableListener {
public:
explicit Compressor(uint8_t pcmID);
Compressor();
virtual ~Compressor();
// Default PCM ID is 0
explicit Compressor(uint8_t pcmID = GetDefaultSolenoidModule());
virtual ~Compressor() = default;
void Start();
void Stop();
@@ -55,10 +55,9 @@ class Compressor : public SensorBase,
void *m_pcm_pointer;
private:
void InitCompressor(uint8_t module);
void SetCompressor(bool on);
ITable *m_table;
ITable *m_table = nullptr;
};
#endif /* Compressor_H_ */

View File

@@ -83,15 +83,15 @@ class Counter : public SensorBase,
ITable *GetTable() const override;
protected:
DigitalSource *m_upSource; ///< What makes the counter count up.
DigitalSource *m_downSource; ///< What makes the counter count down.
void *m_counter; ///< The FPGA counter object.
DigitalSource *m_upSource = nullptr; ///< What makes the counter count up.
DigitalSource *m_downSource = nullptr; ///< What makes the counter count down.
void *m_counter = nullptr; ///< The FPGA counter object.
private:
void InitCounter(Mode mode = kTwoPulse);
bool m_allocatedUpSource; ///< Was the upSource allocated locally?
bool m_allocatedDownSource; ///< Was the downSource allocated locally?
uint32_t m_index; ///< The index of this counter.
bool m_allocatedUpSource = false; ///< Was the upSource allocated locally?
bool m_allocatedDownSource = false; ///< Was the downSource allocated locally?
uint32_t m_index = 0; ///< The index of this counter.
ITable *m_table;
ITable *m_table = nullptr;
};

View File

@@ -20,7 +20,7 @@ class CounterBase {
public:
enum EncodingType { k1X, k2X, k4X };
virtual ~CounterBase() {}
virtual ~CounterBase() = default;
virtual int32_t Get() const = 0;
virtual void Reset() = 0;
virtual double GetPeriod() const = 0;

View File

@@ -43,5 +43,5 @@ class DigitalInput : public DigitalSource, public LiveWindowSendable {
uint32_t m_channel;
bool m_lastValue;
ITable *m_table;
ITable *m_table = nullptr;
};

View File

@@ -51,5 +51,5 @@ class DigitalOutput : public DigitalSource,
uint32_t m_channel;
void *m_pwmGenerator;
ITable *m_table;
ITable *m_table = nullptr;
};

View File

@@ -20,7 +20,7 @@
*/
class DigitalSource : public InterruptableSensorBase {
public:
virtual ~DigitalSource();
virtual ~DigitalSource() = default;
virtual uint32_t GetChannelForRouting() const = 0;
virtual uint32_t GetModuleForRouting() const = 0;
virtual bool GetAnalogTriggerForRouting() const = 0;

View File

@@ -49,5 +49,5 @@ class DoubleSolenoid : public SolenoidBase,
uint8_t m_forwardMask; ///< The mask for the forward channel.
uint8_t m_reverseMask; ///< The mask for the reverse channel.
ITable* m_table;
ITable* m_table = nullptr;
};

View File

@@ -97,15 +97,15 @@ class DriverStation : public SensorBase, public RobotStateInterface {
HALJoystickPOVs m_joystickPOVs[kJoystickPorts];
HALJoystickButtons m_joystickButtons[kJoystickPorts];
HALJoystickDescriptor m_joystickDescriptor[kJoystickPorts];
Task m_task;
SEMAPHORE_ID m_newControlData;
MULTIWAIT_ID m_packetDataAvailableMultiWait;
Task m_task{"DriverStation", (FUNCPTR)DriverStation::InitTask};
SEMAPHORE_ID m_newControlData = 0;
MULTIWAIT_ID m_packetDataAvailableMultiWait = 0;
MUTEX_ID m_packetDataAvailableMutex;
MULTIWAIT_ID m_waitForDataSem;
MULTIWAIT_ID m_waitForDataSem = 0;
MUTEX_ID m_waitForDataMutex;
bool m_userInDisabled;
bool m_userInAutonomous;
bool m_userInTeleop;
bool m_userInTest;
double m_nextMessageTime;
bool m_userInDisabled = false;
bool m_userInAutonomous = false;
bool m_userInTeleop = false;
bool m_userInTest = false;
double m_nextMessageTime = 0;
};

View File

@@ -96,14 +96,14 @@ class Encoder : public SensorBase,
DigitalSource *m_bSource; // the B phase of the quad encoder
bool m_allocatedASource; // was the A source allocated locally?
bool m_allocatedBSource; // was the B source allocated locally?
void *m_encoder;
int32_t m_index; // The encoder's FPGA index.
double m_distancePerPulse; // distance of travel for each encoder tick
Counter *m_counter; // Counter object for 1x and 2x encoding
EncodingType m_encodingType; // Encoding type
int32_t m_encodingScale; // 1x, 2x, or 4x, per the encodingType
void *m_encoder = nullptr;
int32_t m_index = 0; // The encoder's FPGA index.
double m_distancePerPulse = 1.0; // distance of travel for each encoder tick
Counter *m_counter = nullptr; // Counter object for 1x and 2x encoding
EncodingType m_encodingType; // Encoding type
int32_t m_encodingScale; // 1x, 2x, or 4x, per the encodingType
PIDSourceParameter
m_pidSource; // Encoder parameter that sources a PID controller
m_pidSource = kDistance; // Encoder parameter that sources a PID controller
ITable *m_table;
ITable *m_table = nullptr;
};

View File

@@ -23,7 +23,7 @@ class GearTooth : public Counter {
GearTooth(uint32_t channel, bool directionSensitive = false);
GearTooth(DigitalSource *source, bool directionSensitive = false);
GearTooth(DigitalSource &source, bool directionSensitive = false);
virtual ~GearTooth();
virtual ~GearTooth() = default;
void EnableDirectionSensing(bool directionSensitive);
virtual std::string GetSmartDashboardType() const override;

View File

@@ -68,5 +68,5 @@ class Gyro : public SensorBase, public PIDSource, public LiveWindowSendable {
uint32_t m_center;
PIDSourceParameter m_pidSource;
ITable *m_table;
ITable *m_table = nullptr;
};

View File

@@ -20,7 +20,7 @@ class InterruptableSensorBase : public SensorBase {
};
InterruptableSensorBase();
virtual ~InterruptableSensorBase();
virtual ~InterruptableSensorBase() = default;
virtual uint32_t GetChannelForRouting() const = 0;
virtual uint32_t GetModuleForRouting() const = 0;
virtual bool GetAnalogTriggerForRouting() const = 0;
@@ -42,7 +42,7 @@ class InterruptableSensorBase : public SensorBase {
virtual void SetUpSourceEdge(bool risingEdge, bool fallingEdge);
protected:
void *m_interrupt;
void *m_interrupt = nullptr;
uint32_t m_interruptIndex;
void AllocateInterrupts(bool watcher);

View File

@@ -72,12 +72,12 @@ class IterativeRobot : public RobotBase {
protected:
virtual void Prestart();
virtual ~IterativeRobot();
virtual ~IterativeRobot() = default;
IterativeRobot();
private:
bool m_disabledInitialized;
bool m_autonomousInitialized;
bool m_teleopInitialized;
bool m_testInitialized;
bool m_disabledInitialized = false;
bool m_autonomousInitialized = false;
bool m_teleopInitialized = false;
bool m_testInitialized = false;
};

View File

@@ -16,7 +16,7 @@
class Jaguar : public SafePWM, public SpeedController {
public:
explicit Jaguar(uint32_t channel);
virtual ~Jaguar();
virtual ~Jaguar() = default;
virtual void Set(float value, uint8_t syncGroup = 0) override;
virtual float Get() const override;
virtual void Disable() override;
@@ -27,5 +27,5 @@ class Jaguar : public SafePWM, public SpeedController {
private:
void InitJaguar();
bool m_isInverted;
bool m_isInverted = false;
};

View File

@@ -104,13 +104,13 @@ class Joystick : public GenericHID, public ErrorBase {
DISALLOW_COPY_AND_ASSIGN(Joystick);
void InitJoystick(uint32_t numAxisTypes, uint32_t numButtonTypes);
DriverStation *m_ds;
DriverStation *m_ds = nullptr;
uint32_t m_port;
uint32_t *m_axes;
uint32_t *m_buttons;
uint32_t m_outputs;
uint16_t m_leftRumble;
uint16_t m_rightRumble;
uint32_t *m_axes = nullptr;
uint32_t *m_buttons = nullptr;
uint32_t m_outputs = 0;
uint16_t m_leftRumble = 0;
uint16_t m_rightRumble = 0;
};
#endif

View File

@@ -106,7 +106,7 @@ class PWM : public SensorBase,
void InitTable(ITable* subTable) override;
ITable* GetTable() const override;
ITable* m_table;
ITable* m_table = nullptr;
private:
void InitPWM(uint32_t channel);

View File

@@ -40,7 +40,7 @@ class PowerDistributionPanel : public SensorBase, public LiveWindowSendable {
ITable *GetTable() const override;
private:
ITable *m_table;
ITable *m_table = nullptr;
uint8_t m_module;
};

View File

@@ -85,11 +85,11 @@ class Preferences : public ErrorBase, public ITableListener {
static Preferences *_instance;
/** The semaphore for accessing the file */
MUTEX_ID m_fileLock;
MUTEX_ID m_fileLock = nullptr;
/** The semaphore for beginning reads and writes to the file */
SEMAPHORE_ID m_fileOpStarted;
SEMAPHORE_ID m_fileOpStarted = nullptr;
/** The semaphore for reading from the table */
MUTEX_ID m_tableLock;
MUTEX_ID m_tableLock = nullptr;
typedef std::map<std::string, std::string> StringMap;
/** The actual values (String->String) */
StringMap m_values;

View File

@@ -47,7 +47,7 @@ class Relay : public SensorBase,
void InitTable(ITable* subTable) override;
ITable* GetTable() const override;
ITable* m_table;
ITable* m_table = nullptr;
private:
void InitRelay();

View File

@@ -61,8 +61,8 @@ class RobotBase {
virtual void Prestart();
Task *m_task;
DriverStation *m_ds;
Task *m_task = nullptr;
DriverStation *m_ds = nullptr;
private:
static RobotBase *m_instance;

View File

@@ -97,15 +97,15 @@ class RobotDrive : public MotorSafety, public ErrorBase {
void RotateVector(double &x, double &y, double angle);
static const int32_t kMaxNumberOfMotors = 4;
float m_sensitivity;
double m_maxOutput;
float m_sensitivity = 0.5;
double m_maxOutput = 1.0;
bool m_deleteSpeedControllers;
SpeedController *m_frontLeftMotor;
SpeedController *m_frontRightMotor;
SpeedController *m_rearLeftMotor;
SpeedController *m_rearRightMotor;
MotorSafetyHelper *m_safetyHelper;
uint8_t m_syncGroup;
SpeedController *m_frontLeftMotor = nullptr;
SpeedController *m_frontRightMotor = nullptr;
SpeedController *m_rearLeftMotor = nullptr;
SpeedController *m_rearRightMotor = nullptr;
MotorSafetyHelper *m_safetyHelper = nullptr;
uint8_t m_syncGroup = 0;
private:
int32_t GetNumMotors() {

View File

@@ -11,7 +11,7 @@
class SampleRobot : public RobotBase {
public:
SampleRobot();
virtual ~SampleRobot() {}
virtual ~SampleRobot() = default;
virtual void RobotInit();
virtual void Disabled();
virtual void Autonomous();

View File

@@ -62,9 +62,9 @@ class SerialPort : public ErrorBase {
void Reset();
private:
uint32_t m_resourceManagerHandle;
uint32_t m_portHandle;
bool m_consoleModeEnabled;
uint32_t m_resourceManagerHandle = 0;
uint32_t m_portHandle = 0;
bool m_consoleModeEnabled = false;
uint8_t m_port;
DISALLOW_COPY_AND_ASSIGN(SerialPort);

View File

@@ -37,7 +37,7 @@ class Servo : public SafePWM {
void InitTable(ITable* subTable) override;
ITable* GetTable() const override;
ITable* m_table;
ITable* m_table = nullptr;
private:
void InitServo();

View File

@@ -41,5 +41,5 @@ class Solenoid : public SolenoidBase,
void InitSolenoid();
uint32_t m_channel; ///< The channel on the module to control.
ITable* m_table;
ITable* m_table = nullptr;
};

View File

@@ -18,7 +18,7 @@
*/
class SolenoidBase : public SensorBase {
public:
virtual ~SolenoidBase();
virtual ~SolenoidBase() = default;
uint8_t GetAll(int module = 0) const;
uint8_t GetPCMSolenoidBlackList(int module) const;

View File

@@ -14,7 +14,7 @@
*/
class SpeedController : public PIDOutput {
public:
virtual ~SpeedController() {}
virtual ~SpeedController() = default;
/**
* Common interface for setting the speed of a speed controller.
*

View File

@@ -16,7 +16,7 @@
class Talon : public SafePWM, public SpeedController {
public:
explicit Talon(uint32_t channel);
virtual ~Talon();
virtual ~Talon() = default;
virtual void Set(float value, uint8_t syncGroup = 0) override;
virtual float Get() const override;
virtual void Disable() override;
@@ -27,5 +27,5 @@ class Talon : public SafePWM, public SpeedController {
private:
void InitTalon();
bool m_isInverted;
bool m_isInverted = false;
};

View File

@@ -17,7 +17,7 @@
class TalonSRX : public SafePWM, public SpeedController {
public:
explicit TalonSRX(uint32_t channel);
virtual ~TalonSRX();
virtual ~TalonSRX() = default;
virtual void Set(float value, uint8_t syncGroup = 0) override;
virtual float Get() const override;
virtual void Disable() override;
@@ -28,5 +28,5 @@ class TalonSRX : public SafePWM, public SpeedController {
private:
void InitTalonSRX();
bool m_isInverted;
bool m_isInverted = false;
};

View File

@@ -36,26 +36,30 @@ class USBCamera : public ErrorBase {
static constexpr char const *ATTR_BR_VALUE =
"CameraAttributes::Brightness::Value";
// Constants for the manual and auto types
static constexpr char const* AUTO = "Auto";
static constexpr char const* MANUAL = "Manual";
protected:
IMAQdxSession m_id;
IMAQdxSession m_id = 0;
std::string m_name;
bool m_useJpeg;
bool m_active;
bool m_open;
bool m_active = false;
bool m_open = false;
std::recursive_mutex m_mutex;
unsigned int m_width;
unsigned int m_height;
double m_fps;
std::string m_whiteBalance;
unsigned int m_whiteBalanceValue;
bool m_whiteBalanceValuePresent;
std::string m_exposure;
unsigned int m_exposureValue;
bool m_exposureValuePresent;
unsigned int m_brightness;
bool m_needSettingsUpdate;
unsigned int m_width = 320;
unsigned int m_height = 240;
double m_fps = 30;
std::string m_whiteBalance = AUTO;
unsigned int m_whiteBalanceValue = 0;
bool m_whiteBalanceValuePresent = false;
std::string m_exposure = MANUAL;
unsigned int m_exposureValue = 50;
bool m_exposureValuePresent = false;
unsigned int m_brightness = 80;
bool m_needSettingsUpdate = true;
unsigned int GetJpegSize(void *buffer, unsigned int buffSize);

View File

@@ -90,5 +90,5 @@ class Ultrasonic : public SensorBase,
Ultrasonic *m_nextSensor;
DistanceUnit m_units;
ITable *m_table;
ITable *m_table = nullptr;
};

View File

@@ -19,7 +19,7 @@
class Victor : public SafePWM, public SpeedController {
public:
explicit Victor(uint32_t channel);
virtual ~Victor();
virtual ~Victor() = default;
virtual void Set(float value, uint8_t syncGroup = 0) override;
virtual float Get() const override;
virtual void Disable() override;
@@ -31,5 +31,5 @@ class Victor : public SafePWM, public SpeedController {
private:
void InitVictor();
bool m_isInverted;
bool m_isInverted = false;
};

View File

@@ -16,7 +16,7 @@
class VictorSP : public SafePWM, public SpeedController {
public:
explicit VictorSP(uint32_t channel);
virtual ~VictorSP();
virtual ~VictorSP() = default;
virtual void Set(float value, uint8_t syncGroup = 0) override;
virtual float Get() const override;
virtual void Disable() override;
@@ -28,5 +28,5 @@ class VictorSP : public SafePWM, public SpeedController {
private:
void InitVictorSP();
bool m_isInverted;
bool m_isInverted = false;
};

View File

@@ -89,27 +89,27 @@ class AxisCamera : public ErrorBase {
private:
std::thread m_captureThread;
std::string m_cameraHost;
int m_cameraSocket;
int m_cameraSocket = -1;
std::mutex m_captureMutex;
std::mutex m_imageDataMutex;
std::vector<uint8_t> m_imageData;
bool m_freshImage;
bool m_freshImage = false;
int m_brightness;
WhiteBalance m_whiteBalance;
int m_colorLevel;
ExposureControl m_exposureControl;
int m_exposurePriority;
int m_maxFPS;
Resolution m_resolution;
int m_compression;
Rotation m_rotation;
bool m_parametersDirty;
bool m_streamDirty;
int m_brightness = 50;
WhiteBalance m_whiteBalance = kWhiteBalance_Automatic;
int m_colorLevel = 50;
ExposureControl m_exposureControl = kExposureControl_Automatic;
int m_exposurePriority = 50;
int m_maxFPS = 0;
Resolution m_resolution = kResolution_640x480;
int m_compression = 50;
Rotation m_rotation = kRotation_0;
bool m_parametersDirty = true;
bool m_streamDirty = true;
std::mutex m_parametersMutex;
bool m_done;
bool m_done = false;
void Capture();
void ReadImagesFromCamera();

View File

@@ -19,7 +19,7 @@
class BinaryImage : public MonoImage {
public:
BinaryImage();
virtual ~BinaryImage();
virtual ~BinaryImage() = default;
int GetNumberParticles();
ParticleAnalysisReport GetParticleAnalysisReport(int particleNumber);
void GetParticleAnalysisReport(int particleNumber,

View File

@@ -13,7 +13,7 @@
class ColorImage : public ImageBase {
public:
ColorImage(ImageType type);
virtual ~ColorImage();
virtual ~ColorImage() = default;
BinaryImage *ThresholdRGB(int redLow, int redHigh, int greenLow,
int greenHigh, int blueLow, int blueHigh);
BinaryImage *ThresholdHSL(int hueLow, int hueHigh, int saturationLow,

View File

@@ -15,5 +15,5 @@ class HSLImage : public ColorImage {
public:
HSLImage();
HSLImage(const char *fileName);
virtual ~HSLImage();
virtual ~HSLImage() = default;
};

View File

@@ -13,7 +13,7 @@
class MonoImage : public ImageBase {
public:
MonoImage();
virtual ~MonoImage();
virtual ~MonoImage() = default;
std::vector<EllipseMatch> *DetectEllipses(
EllipseDescriptor *ellipseDescriptor, CurveOptions *curveOptions,

View File

@@ -15,5 +15,5 @@ class RGBImage : public ColorImage {
public:
RGBImage();
RGBImage(const char *fileName);
virtual ~RGBImage();
virtual ~RGBImage() = default;
};