improve sensorservice dumpsys and increase the max sensor rate to 1 ms (1000Hz)

the increased maximum rate is needed for proper gyro integration, current gyro
parts can sample at up to 800Hz

Change-Id: Ide75f6d5bc7a0fdafeb2dafd72db39e7afb9e794
This commit is contained in:
Mathias Agopian
2010-11-05 19:12:58 -07:00
parent 5fd3054048
commit 94c4f5c1b2
3 changed files with 16 additions and 5 deletions

View File

@ -175,10 +175,11 @@ status_t SensorService::dump(int fd, const Vector<String16>& args)
for (size_t i=0 ; i<mSensorList.size() ; i++) {
const Sensor& s(mSensorList[i]);
const sensors_event_t& e(mLastEventSeen.valueFor(s.getHandle()));
snprintf(buffer, SIZE, "%s (vendor=%s, handle=%d, last=<%5.1f,%5.1f,%5.1f>)\n",
snprintf(buffer, SIZE, "%s (vendor=%s, handle=%d, maxRate=%.2fHz, last=<%5.1f,%5.1f,%5.1f>)\n",
s.getName().string(),
s.getVendor().string(),
s.getHandle(),
s.getMinDelay() ? (1000000.0f / s.getMinDelay()) : 0.0f,
e.data[0], e.data[1], e.data[2]);
result.append(buffer);
}