cancel
Showing results for 
Search instead for 
Did you mean: 

WICED Smart Bluetooth

Anonymous
Not applicable

Hi all,

I have the battery service working fine, but I would like to fine-tune it.

I invoke blebat_Init() in your application_create function, and then periodically invoke blebat_pollMonitor().


Then I tried to fine-tune blebat_batmon_cfg in blebat.c, but modifying the members of the blebat_batmon_cfg does not scale appropriately for our battery.


For a test, I changed:


    /*.fullVoltage                     =*/ 3200,            // millivolts. The nominal full battery voltage

    /*.emptyVoltage                    =*/ 1800,            // millivolts. The voltage at which the batteries are considered drained

    /*.shutdownVoltage                 =*/ 1700,            // millivolts. System should shutdown if it detects battery

To:

    /*.fullVoltage                     =*/ 6100,            // millivolts. The nominal full battery voltage

    /*.emptyVoltage                    =*/ 2400,            // millivolts. The voltage at which the batteries are considered drained

    /*.shutdownVoltage                 =*/ 1700,            // millivolts. System should shutdown if it detects battery

And then used a battery that's about 2.8 V but it says 72% in both cases.  In the second case it should report a much lower %.

The big question is:

Is the new version of blebat.c really compiled, linked and loaded with the rest of the application? 

In my case, I don't think that is happening.  What am I doing wrong?  I saved it, cleaned the project, rebuilt "all" and loaded it.

Please help.

Thanks,

Gil

0 Likes
1 Solution
BoonT_56
Employee

You may like to check out the wiced_sense source for a better understanding on how to implement this. Read onward from the below line:

//Scale battery level into percentage and update GATT DB.

View solution in original post

1 Reply
BoonT_56
Employee

You may like to check out the wiced_sense source for a better understanding on how to implement this. Read onward from the below line:

//Scale battery level into percentage and update GATT DB.

View solution in original post