How to change attributes in a C++ arduino library without modifying the library?

This is my library code (BNO055 is an IMU:accelerometer+gyroscope among other sensors)

void BNO055::init() {
    // Select BNO055 config mode
    writeByte(BNO055_ADDRESS, BNO055_OPR_MODE, CONFIGMODE );
    delay(25);
    // Select page 1 to configure sensors
    writeByte(BNO055_ADDRESS, BNO055_PAGE_ID, 0x01);
    // Configure ACC
    writeByte(BNO055_ADDRESS, BNO055_ACC_CONFIG, APwrMode << 5 | Abw << 3 | Ascale );
    // Configure GYR
    writeByte(BNO055_ADDRESS, BNO055_GYRO_CONFIG_0, Gbw << 3 | Gscale );
    writeByte(BNO055_ADDRESS, BNO055_GYRO_CONFIG_1, GPwrMode);
    // Configure MAG
    writeByte(BNO055_ADDRESS, BNO055_MAG_CONFIG, MPwrMode << 5 | MOpMode << 3 | Modr );
    // Select page 0 to read sensors
    writeByte(BNO055_ADDRESS, BNO055_PAGE_ID, 0x00);
    // Select BNO055 gyro temperature source 
    writeByte(BNO055_ADDRESS, BNO055_TEMP_SOURCE, 0x01 );
    // Select BNO055 sensor units (temperature in degrees C, rate in dps, accel in mg)
    writeByte(BNO055_ADDRESS, BNO055_UNIT_SEL, 0x01 );
    // Select BNO055 system power mode
    writeByte(BNO055_ADDRESS, BNO055_PWR_MODE, PWRMode );
    // Select BNO055 system operation mode
    writeByte(BNO055_ADDRESS, BNO055_OPR_MODE, OPRMode );
    delay(25);
 }

This is the line of code I use to initialize the BNO055

sensors[0].init();

But this options are not correct

sensors[0].init().GPwrMode = Normalpwr;

Nor this

 sensors[0].GPwrMode = Normalpwr;

If you want it to iniitialize to different values you will need to change the library code.

As things are now, I presume you can set the values to the values you want after the device is initialized? If so, why not just put a couple of lines of code after your call to init()?

...R

PS ... if you do decide to change the library code be sure to give the revised version of the library a different name so that there is no confusion about which version is being used.

albertogo1989:
This is my library code (BNO055 is an IMU:accelerometer+gyroscope among other sensors)

What does "my" mean? You are the one who wrote it?

albertogo1989:
But this options are not correct

This is simply invalid code.

How is anyone supposed to answer your question without seeing the library? Where is the library?