-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nrf_wifi: Add support to read battery voltage #9
base: main
Are you sure you want to change the base?
Conversation
b0719eb
to
cf688ec
Compare
This commit introduces support for reading and displaying the battery voltage. Signed-off-by: Mahammadyunus Patil <[email protected]>
Can you please add a copyright to |
if (bat_volt_params.cmd_status) { | ||
nrf_wifi_osal_log_err("Volatge reading failed"); | ||
} | ||
else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be on the previous line (i.e } else {
) ?
struct nrf_wifi_bat_volt_params get_bat_volt; | ||
struct nrf_wifi_fmac_dev_ctx_rt* rt_dev_ctx = NULL; | ||
unsigned int count = 0; | ||
rt_dev_ctx = wifi_dev_priv(fmac_dev_ctx); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Insert blank line before this.
else { | ||
bat_volt = (BAT_CONST_1 + (BAT_CONST_2 * bat_volt_params.voltage)); | ||
|
||
nrf_wifi_osal_log_info("The battery voltage is = %d mV", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
API says Retrieves the battery voltage in volts
but value here seems to be in mV
?
This commit introduces support for reading and
displaying the battery voltage.