From 16ab1b69c62702e052d3072c88e2cd654848d9d8 Mon Sep 17 00:00:00 2001 From: Gwendal Grignou Date: Thu, 6 Oct 2016 10:55:38 -0700 Subject: [PATCH] util: ectool: Add names for new sensors. Match ec_commands.h, adding new type and sensors. BUG=none BRANCH=reef TEST=Check on Reef that barometer sensor info is displayed properly. Change-Id: I257f5161e5f57be562a2b3a29442b49f47f3fc89 Signed-off-by: Gwendal Grignou Reviewed-on: https://chromium-review.googlesource.com/394749 Reviewed-by: Vincent Palatin --- util/ectool.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/util/ectool.c b/util/ectool.c index 2b7e5f2bf4..3ba5804095 100644 --- a/util/ectool.c +++ b/util/ectool.c @@ -3579,6 +3579,9 @@ static int cmd_motionsense(int argc, char **argv) case MOTIONSENSE_TYPE_ACTIVITY: printf("activity\n"); break; + case MOTIONSENSE_TYPE_BARO: + printf("barometer\n"); + break; default: printf("unknown\n"); } @@ -3612,6 +3615,15 @@ static int cmd_motionsense(int argc, char **argv) case MOTIONSENSE_CHIP_KX022: printf("kx022\n"); break; + case MOTIONSENSE_CHIP_L3GD20H: + printf("l3gd20h\n"); + break; + case MOTIONSENSE_CHIP_BMA255: + printf("bma255\n"); + break; + case MOTIONSENSE_CHIP_BMP280: + printf("bmp280\n"); + break; default: printf("unknown\n"); } @@ -3765,8 +3777,7 @@ static int cmd_motionsense(int argc, char **argv) printf("Timestamp:%" PRIx32 "\n", resp->fifo_info.timestamp); printf("Total lost: %d\n", resp->fifo_info.total_lost); for (i = 0; i < sensor_count; i++) { - int lost; - lost = resp->fifo_info.lost[i]; + int lost = resp->fifo_info.lost[i]; if (lost != 0) printf("Lost %d: %d\n", i, lost); }