From 0d1b0639426987c04003897e2be31421bb6ff27f Mon Sep 17 00:00:00 2001 From: Kalman Date: Thu, 16 Aug 2018 19:34:01 +0800 Subject: [PATCH] Add options --- include/mynteye/types.h | 30 ++++++++++++++++++++++++++++++ src/internal/channels.cc | 37 +++++++++++++++++++++++++++++++++++-- src/internal/config.cc | 7 ++++++- src/internal/motions.cc | 14 ++++++++------ src/internal/motions.h | 3 +++ 5 files changed, 82 insertions(+), 9 deletions(-) diff --git a/include/mynteye/types.h b/include/mynteye/types.h index 706bc44..117a2a4 100644 --- a/include/mynteye/types.h +++ b/include/mynteye/types.h @@ -197,6 +197,36 @@ enum class Option : std::uint8_t { ZERO_DRIFT_CALIBRATION, /** Erase chip */ ERASE_CHIP, + /** + * min exposure time, valid if auto-exposure + * + * range: [0,?], default: ? + */ + MIN_EXPOSURE_TIME, + /** + * The range of accelerometer + * + * values: {?}, default: ? + */ + ACCELEROMETER_RANGE, + /** + * The range of gyroscope + * + * values: {?}, default: ? + */ + GYROSCOPE_RANGE, + /** + * The parameter of accelerometer low pass filter + * + * values: {?}, default: ? + */ + ACCELEROMETER_LOW_PASS_FILTER, + /** + * The parameter of gyroscope low pass filter + * + * values: {?}, default: ? + */ + GYROSCOPE_LOW_PASS_FILTER, /** Last guard */ LAST }; diff --git a/src/internal/channels.cc b/src/internal/channels.cc index 58c6668..3426a6e 100644 --- a/src/internal/channels.cc +++ b/src/internal/channels.cc @@ -64,6 +64,21 @@ int XuCamCtrlId(Option option) { case Option::FRAME_RATE: return 7; break; + case Option::MIN_EXPOSURE_TIME: + return 8; + break; + case Option::ACCELEROMETER_RANGE: + return 9; + break; + case Option::GYROSCOPE_RANGE: + return 10; + break; + case Option::ACCELEROMETER_LOW_PASS_FILTER: + return 11; + break; + case Option::GYROSCOPE_LOW_PASS_FILTER: + return 12; + break; default: LOG(FATAL) << "No cam ctrl id for " << option; } @@ -137,7 +152,10 @@ void Channels::UpdateControlInfos() { for (auto &&option : std::vector