Commit 2b884a70 authored by Luis Ubieda's avatar Luis Ubieda Committed by Mahesh Mahadevan
Browse files

sensor: shell: Allow individual axis data to be processed

For the supported channels, instead of just allowing 3-axis data being
printed out, allow individual channels to be processed (e.g: accel_x,
gyro_y, etc).

Signed-off-by: default avatarLuis Ubieda <luisf@croxel.com>
(cherry picked from commit 36dfea12)
parent 50c415d3
Loading
Loading
Loading
Loading
+0 −17
Changes for drivers/sensor/sensor_shell.c: 0 added lines, 17 removed lines.
Original line number Diff line number Diff line
@@ -354,23 +354,6 @@ void sensor_shell_processing_callback(int result, uint8_t *buf, uint32_t buf_len
		size_t frame_size;
		uint16_t frame_count;

		/* Channels with multi-axis equivalents are skipped */
		switch (ch.chan_type) {
		case SENSOR_CHAN_ACCEL_X:
		case SENSOR_CHAN_ACCEL_Y:
		case SENSOR_CHAN_ACCEL_Z:
		case SENSOR_CHAN_GYRO_X:
		case SENSOR_CHAN_GYRO_Y:
		case SENSOR_CHAN_GYRO_Z:
		case SENSOR_CHAN_MAGN_X:
		case SENSOR_CHAN_MAGN_Y:
		case SENSOR_CHAN_MAGN_Z:
		case SENSOR_CHAN_POS_DX:
		case SENSOR_CHAN_POS_DY:
		case SENSOR_CHAN_POS_DZ:
			continue;
		}

		rc = decoder->get_size_info(ch, &base_size, &frame_size);
		if (rc != 0) {
			LOG_DBG("skipping unsupported channel %s:%d",