diff options
author | Adam Zalcman <viathor@google.com> | 2011-07-17 21:46:09 +0200 |
---|---|---|
committer | Adam Zalcman <viathor@google.com> | 2011-07-17 21:46:09 +0200 |
commit | a1f8a5b3a11ea104dfdaf7e73a7df7ace2676aaf (patch) | |
tree | 2b88360a21293e77fdbdc42de5dbf523361d2dcf | |
parent | 87403b57ff17e42b7f3094c0b489bcc19e097fe9 (diff) | |
download | sdk-a1f8a5b3a11ea104dfdaf7e73a7df7ace2676aaf.zip sdk-a1f8a5b3a11ea104dfdaf7e73a7df7ace2676aaf.tar.gz sdk-a1f8a5b3a11ea104dfdaf7e73a7df7ace2676aaf.tar.bz2 |
Fix magnetic field sensor string.
The emulator's sensor module sends "magnetic-field:<x>:<y>:<z>" rather
than "magnetic:<x>:<y>:<z>", see external/qemu/android/hw-sensors.c.
Change-Id: I858f4f88a4af47504bbf204340db238cf2ac2d66
Signed-off-by: Adam Zalcman <viathor@google.com>
-rw-r--r-- | emulator/sensors/sensors_qemu.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/emulator/sensors/sensors_qemu.c b/emulator/sensors/sensors_qemu.c index 9a776c7..ff83bf8 100644 --- a/emulator/sensors/sensors_qemu.c +++ b/emulator/sensors/sensors_qemu.c @@ -340,8 +340,8 @@ data__poll(struct sensors_poll_device_t *dev, sensors_event_t* values) continue; } - /* "magnetic:<x>:<y>:<z>" is sent for the params of the magnetic field */ - if (sscanf(buff, "magnetic:%g:%g:%g", params+0, params+1, params+2) == 3) { + /* "magnetic-field:<x>:<y>:<z>" is sent for the params of the magnetic field */ + if (sscanf(buff, "magnetic-field:%g:%g:%g", params+0, params+1, params+2) == 3) { new_sensors |= SENSORS_MAGNETIC_FIELD; data->sensors[ID_MAGNETIC_FIELD].magnetic.x = params[0]; data->sensors[ID_MAGNETIC_FIELD].magnetic.y = params[1]; |