#pragma once

#include "data/config/AxisConfig.h"
#include "data/config/SamplerConfig.h"
#include "data/config/SensorSpecificSettings.h"

namespace inertia
{

struct INERTIA_API QuadAxisConfig
	: AxisConfig
	, SamplerConfig
{
	bool adoptOffset;
	bool adoptScale;
	bool enable1;
	bool enable2;
	bool enable3;
	bool enable4;
	bool wakeupFromLowPower;
	int32_t offset1;
	int32_t offset2;
	int32_t offset3;
	int32_t offset4;
	float scale1;
	float scale2;
	float scale3;
	float scale4;
	uint16_t sensitivity;
	SpecificSensorSettingsPtr specificSettings;

	QuadAxisConfig(uint8_t sensorID, uint8_t const headerRevision = 1, uint8_t const sensorRevision = 0);
	QuadAxisConfig(uint8_t const* in, const unsigned _length);
	QuadAxisConfig(std::wstring const& argString);

#ifdef WITH_BOOST_PROGRAM_OPTIONS
	static const po::options_description GetOptionDescription();
#endif

	void GetBytes(std::vector<uint8_t>& out) const override;
	const std::pair<unsigned, Channel> GetChannel() const override;
	const std::wstring ToString() const override;
	const std::wstring ToSimpleString(uint16_t const globalRate) const override;
	double GetRangeFactor() const override;
	unsigned GetResolution() const override;
	unsigned GetMaxRate() const override;
	unsigned GetInstanceMask() const override;
};

}
