feat(*): add function to querry some hardware info

This commit is contained in:
kalman
2019-02-28 14:56:18 +08:00
parent b6d4037357
commit c24e2806b3
17 changed files with 83 additions and 13 deletions

View File

@@ -2,9 +2,11 @@
---
device_name: MYNT-EYE-S210A
serial_number: "07C40D1C0009071F"
firmware_version: "0.1"
firmware_version: "1.1"
hardware_version: "1.0"
spec_version: "1.1"
lens_type: "0000"
imu_type: "0000"
spec_version: "1.2"
lens_type: "0001"
imu_type: "0001"
nominal_baseline: 0
auxiliary_chip_version: "1.0"
isp_version: "1.0"

View File

@@ -52,7 +52,11 @@ bool DeviceWriter::WriteDeviceInfo(const dev_info_t &info) {
<< ", spec_version: " << dev_info->spec_version.to_string()
<< ", lens_type: " << dev_info->lens_type.to_string()
<< ", imu_type: " << dev_info->imu_type.to_string()
<< ", nominal_baseline: " << dev_info->nominal_baseline << "}";
<< ", nominal_baseline: " << dev_info->nominal_baseline
<< ", auxiliary_chip_version: "
<< dev_info->auxiliary_chip_version.to_string()
<< ", isp_version: "
<< dev_info->isp_version.to_string()<< "}";
return true;
} else {
LOG(ERROR) << "Write device info failed";
@@ -215,6 +219,8 @@ bool DeviceWriter::SaveDeviceInfo(
fs << "lens_type" << info.lens_type.to_string();
fs << "imu_type" << info.imu_type.to_string();
fs << "nominal_baseline" << info.nominal_baseline;
fs << "auxiliary_chip_version" << info.auxiliary_chip_version.to_string();
fs << "isp_version" << info.isp_version.to_string();
// save other infos according to spec_version
fs.release();
return true;