fix(*): rename is_etc

This commit is contained in:
kalman 2019-03-29 17:28:10 +08:00
parent 5017d5c901
commit bab2e23e39
3 changed files with 8 additions and 8 deletions

View File

@ -661,13 +661,13 @@ struct MYNTEYE_API ImgData {
/** Image exposure time, virtual value in [1, 480] */
std::uint16_t exposure_time;
/** Is external time source */
bool is_etc = false;
bool is_ets = false;
void Reset() {
frame_id = 0;
timestamp = 0;
exposure_time = 0;
is_etc = false;
is_ets = false;
}
ImgData() {
@ -677,13 +677,13 @@ struct MYNTEYE_API ImgData {
frame_id = other.frame_id;
timestamp = other.timestamp;
exposure_time = other.exposure_time;
is_etc = other.is_etc;
is_ets = other.is_ets;
}
ImgData &operator=(const ImgData &other) {
frame_id = other.frame_id;
timestamp = other.timestamp;
exposure_time = other.exposure_time;
is_etc = other.is_etc;
is_ets = other.is_ets;
return *this;
}
};

View File

@ -56,7 +56,7 @@ void unpack_imu_segment(const ImuData &imu, ImuSegment *seg) {
seg->frame_id = imu.frame_id;
seg->timestamp = imu.timestamp;
seg->flag = imu.flag & 0b0011;
seg->is_ets = (imu.flag & 0b0100 == 0b0100);
seg->is_ets = ((imu.flag & 0b0100) == 0b0100);
seg->temperature = imu.temperature;
seg->accel[0] = (seg->flag == 1) ? imu.accel_or_gyro[0] : 0;
seg->accel[1] = (seg->flag == 1) ? imu.accel_or_gyro[1] : 0;

View File

@ -33,7 +33,7 @@ struct ImagePacket {
std::uint16_t exposure_time;
std::uint8_t checksum;
// Is external time source
bool is_etc;
bool is_ets;
ImagePacket() = default;
explicit ImagePacket(std::uint8_t *data) {
from_data(data);
@ -43,7 +43,7 @@ struct ImagePacket {
std::uint32_t timestamp_l;
std::uint32_t timestamp_h;
header = *data & 0b0111;
is_ets = (*data & 0b1000 == 0b1000);
is_ets = ((*data & 0b1000) == 0b1000);
size = *(data + 1);
frame_id = (*(data + 2) << 8) | *(data + 3);
timestamp_h = (*(data + 4) << 24) | (*(data + 5) << 16) |
@ -139,7 +139,7 @@ bool unpack_stereo_img_data(
img->frame_id = img_packet.frame_id;
img->timestamp = img_packet.timestamp;
img->exposure_time = img_packet.exposure_time;
img->is_etc = img_packet.is_etc;
img->is_ets = img_packet.is_ets;
return true;
}