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 <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/394749
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
This commit is contained in:
Gwendal Grignou
2016-10-06 10:55:38 -07:00
committed by chrome-bot
parent 989b64b65a
commit 16ab1b69c6

View File

@@ -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);
}