Skip to content

Commit 3029229

Browse files
ubiedanashif
authored andcommitted
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: Luis Ubieda <[email protected]> (cherry picked from commit 36dfea1)
1 parent e659803 commit 3029229

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

drivers/sensor/sensor_shell.c

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -354,23 +354,6 @@ void sensor_shell_processing_callback(int result, uint8_t *buf, uint32_t buf_len
354354
size_t frame_size;
355355
uint16_t frame_count;
356356

357-
/* Channels with multi-axis equivalents are skipped */
358-
switch (ch.chan_type) {
359-
case SENSOR_CHAN_ACCEL_X:
360-
case SENSOR_CHAN_ACCEL_Y:
361-
case SENSOR_CHAN_ACCEL_Z:
362-
case SENSOR_CHAN_GYRO_X:
363-
case SENSOR_CHAN_GYRO_Y:
364-
case SENSOR_CHAN_GYRO_Z:
365-
case SENSOR_CHAN_MAGN_X:
366-
case SENSOR_CHAN_MAGN_Y:
367-
case SENSOR_CHAN_MAGN_Z:
368-
case SENSOR_CHAN_POS_DX:
369-
case SENSOR_CHAN_POS_DY:
370-
case SENSOR_CHAN_POS_DZ:
371-
continue;
372-
}
373-
374357
rc = decoder->get_size_info(ch, &base_size, &frame_size);
375358
if (rc != 0) {
376359
LOG_DBG("skipping unsupported channel %s:%d",

0 commit comments

Comments
 (0)