Fix imu range bug

This commit is contained in:
Kalman 2018-11-20 19:13:41 +08:00
parent 0610d43fe5
commit 2b1288bcd4
3 changed files with 11 additions and 11 deletions

View File

@ -19,8 +19,8 @@
| 最大曝光时间 | max_exposure_time | 2 | 333 | 0 | 1000 | √ | 0x1B | XU_CAM_CTRL | 0x0100 | 开始自动曝光,可设定的阈值 |
| 期望亮度 | desired_brightness | 2 | 122 | 1 | 255 | √ | 0x19 | XU_CAM_CTRL | 0x0100 | |
| 擦除芯片 | erase_chip | | - | - | - | × | - | XU_HALF_DUPLEX | 0x0200 | |
| 最小曝光时间 | min_exposure_time | 2 | 0 | 0 | 1000 | √ | ?? | XU_CAM_CTRL | 0x0100 | 开始自动曝光,可设定的阈值 |
| 加速度计量程 | accelerometer_range | 2 | 12 | 6 | 48 | √ | ?? | XU_CAM_CTRL | 0x0100 | |
| 陀螺仪量程 | gyroscope_range | 2 | 1000 | 250 | 4000 | √ | ?? | XU_CAM_CTRL | 0x0100 | |
| 加速度计低通滤波 | accelerometer_low_pass_filter | 2 | 2 | 0 | 2 | √ | ?? | XU_CAM_CTRL | 0x0100 | |
| 陀螺仪低通滤波 | gyroscope__low_pass_filter | 2 | 64 | 23 | 64 | √ | ?? | XU_CAM_CTRL | 0x0100 | |
| 最小曝光时间 | min_exposure_time | 2 | 0 | 0 | 1000 | √ | - | XU_CAM_CTRL | 0x0100 | 开始自动曝光,可设定的阈值 |
| 加速度计量程 | accelerometer_range | 2 | 12 | 6 | 48 | √ | - | XU_CAM_CTRL | 0x0100 | |
| 陀螺仪量程 | gyroscope_range | 2 | 1000 | 250 | 4000 | √ | - | XU_CAM_CTRL | 0x0100 | |
| 加速度计低通滤波 | accelerometer_low_pass_filter | 2 | 2 | 0 | 2 | √ | - | XU_CAM_CTRL | 0x0100 | |
| 陀螺仪低通滤波 | gyroscope__low_pass_filter | 2 | 64 | 23 | 64 | √ | - | XU_CAM_CTRL | 0x0100 | |

View File

@ -200,31 +200,31 @@ enum class Option : std::uint8_t {
/**
* min exposure time, valid if auto-exposure
*
* range: [0,?], default: ?
* range: [0,1000], default: 0
*/
MIN_EXPOSURE_TIME,
/**
* The range of accelerometer
*
* values: {?}, default: ?
* values: {6,12,24,48}, default: 6
*/
ACCELEROMETER_RANGE,
/**
* The range of gyroscope
*
* values: {?}, default: ?
* values: {250,500,1000,2000,4000}, default: 1000
*/
GYROSCOPE_RANGE,
/**
* The parameter of accelerometer low pass filter
*
* values: {?}, default: ?
* values: {0,1,2}, default: 2
*/
ACCELEROMETER_LOW_PASS_FILTER,
/**
* The parameter of gyroscope low pass filter
*
* values: {?}, default: ?
* values: {23,64}, default: 64
*/
GYROSCOPE_LOW_PASS_FILTER,
/** Last guard */

View File

@ -262,7 +262,7 @@ void Channels::SetControlValue(const Option &option, std::int32_t value) {
XuCamCtrlSet(option, value);
} break;
case Option::GYROSCOPE_RANGE: {
if (!in_range() || !in_values({6, 12, 24, 48}))
if (!in_range() || !in_values({250, 500, 1000, 2000, 4000}))
break;
XuCamCtrlSet(option, value);
} break;