Merge "libhardware: fix -Wreorder-init-list" am: b833bfbd5f
am: 93aa2fa353
Change-Id: I01a4ee7ce7fcdbe98730280e9263a5a55926c60c
This commit is contained in:
commit
8dc561977f
3 changed files with 9 additions and 9 deletions
|
@ -111,8 +111,8 @@ int DynamicSensorManager::flush(int handle) {
|
|||
if (handle == mHandleRange.first) {
|
||||
// submit a flush complete here
|
||||
static const sensors_event_t event = {
|
||||
.type = SENSOR_TYPE_META_DATA,
|
||||
.sensor = mHandleRange.first,
|
||||
.type = SENSOR_TYPE_META_DATA,
|
||||
.timestamp = TIMESTAMP_AUTO_FILL, // timestamp will be filled at dispatcher
|
||||
};
|
||||
submitEvent(nullptr, event);
|
||||
|
|
|
@ -177,13 +177,13 @@ HidRawSensor::HidRawSensor(
|
|||
}
|
||||
|
||||
ReportTranslateRecord record = {
|
||||
.minValue = digest.minRaw,
|
||||
.type = TYPE_FLOAT,
|
||||
.maxValue = digest.maxRaw,
|
||||
.minValue = digest.minRaw,
|
||||
.byteOffset = digest.bitOffset / 8,
|
||||
.byteSize = digest.bitSize / 8,
|
||||
.a = digest.a,
|
||||
.b = digest.b,
|
||||
.type = TYPE_FLOAT
|
||||
};
|
||||
// keep track of range and resolution
|
||||
range = std::max(std::max(std::abs((digest.maxRaw + digest.b) * digest.a),
|
||||
|
@ -250,12 +250,12 @@ bool HidRawSensor::processQuaternionUsage(const std::vector<HidParser::ReportPac
|
|||
}
|
||||
|
||||
ReportTranslateRecord record = {
|
||||
.minValue = quat.minRaw,
|
||||
.type = TYPE_FLOAT,
|
||||
.maxValue = quat.maxRaw,
|
||||
.minValue = quat.minRaw,
|
||||
.byteOffset = quat.bitOffset / 8,
|
||||
.byteSize = quat.bitSize / 8,
|
||||
.b = quat.b,
|
||||
.type = TYPE_FLOAT,
|
||||
};
|
||||
|
||||
// Android X Y Z maps to HID X -Z Y
|
||||
|
@ -351,10 +351,10 @@ bool HidRawSensor::processTriAxisUsage(const std::vector<HidParser::ReportPacket
|
|||
mFeatureInfo.reportModeFlag = SENSOR_FLAG_CONTINUOUS_MODE;
|
||||
|
||||
ReportTranslateRecord record = {
|
||||
.minValue = reportX.minRaw,
|
||||
.type = TYPE_FLOAT,
|
||||
.maxValue = reportX.maxRaw,
|
||||
.minValue = reportX.minRaw,
|
||||
.byteSize = reportX.bitSize / 8,
|
||||
.type = TYPE_FLOAT
|
||||
};
|
||||
|
||||
// Reorder and swap axis
|
||||
|
|
|
@ -231,9 +231,9 @@ std::vector<HidParser::ReportPacket> HidParser::convertGroupToPacket(
|
|||
|
||||
// template
|
||||
ReportPacket packet = {
|
||||
.bitSize = 0,
|
||||
.type = type,
|
||||
.id = id,
|
||||
.bitSize = 0
|
||||
};
|
||||
|
||||
for (const auto &r : reports) {
|
||||
|
@ -252,10 +252,10 @@ std::vector<HidParser::ReportPacket> HidParser::convertGroupToPacket(
|
|||
.maxRaw = logical.second,
|
||||
.a = scale,
|
||||
.b = offset,
|
||||
.unit = r.getUnit(),
|
||||
.bitOffset = packet.bitSize,
|
||||
.bitSize = r.getSize(),
|
||||
.count = r.getCount(),
|
||||
.unit = r.getUnit(),
|
||||
};
|
||||
packet.reports.push_back(digest);
|
||||
packet.bitSize += digest.bitSize * digest.count;
|
||||
|
|
Loading…
Reference in a new issue