Skip to content

could you review the accel scale factor of the icm20948? [16] X --> 16,384-->16384 ??.................. #17

Description

@yvsim001

// Determine the scaling factor based on the Full scale select config
// and then scale the values
switch( settings.accel.fs ) {
case ICM20948_ACCEL_FS_SEL_2G:
accel->x /= 16; //I think 16384 is right?
accel->y /= 16; //?
accel->z /= 16; //?
break;

        case ICM20948_ACCEL_FS_SEL_4G:
            accel->x /= 8;  //?
            accel->y /= 8;  //?
            accel->z /= 8;  //?
            break;

        case ICM20948_ACCEL_FS_SEL_8G:
            accel->x /= 4;  //?
            accel->y /= 4;  //?
            accel->z /= 4;  //?
            break;

        case ICM20948_ACCEL_FS_SEL_16G:
            accel->x /= 2;  //?
            accel->y /= 2;  //?
            accel->z /= 2;  //?
            break;

        default:
            // We have an invalid config setting for the resolution
            accel->x = 0;  //?
            accel->y = 0;  //?
            accel->z = 0;  //?
            ret = ICM20948_RET_INV_CONFIG;
            break;
    }

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions