Skip to content
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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

imapa
Copy link

@imapa imapa commented Dec 2, 2024

This commit introduces support for reading and
displaying the battery voltage.

fw_if/umac_if/src/event.c Outdated Show resolved Hide resolved
hw_if/hal/inc/fw/phy_rf_params.h Show resolved Hide resolved
hw_if/hal/inc/fw/phy_rf_params.h Outdated Show resolved Hide resolved
hw_if/hal/inc/fw/phy_rf_params.h Show resolved Hide resolved
@imapa imapa force-pushed the vbat branch 2 times, most recently from b0719eb to cf688ec Compare December 3, 2024 05:25
This commit introduces support for reading and
displaying the battery voltage.

Signed-off-by: Mahammadyunus Patil <[email protected]>
@krish2718
Copy link
Collaborator

Can you please add a copyright to CODEOWNERS to fix the CI https://github.com/zephyrproject-rtos/zephyr/actions/runs/12120329300/job/33833167116?pr=82424

if (bat_volt_params.cmd_status) {
nrf_wifi_osal_log_err("Volatge reading failed");
}
else {
Copy link
Collaborator

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);
Copy link
Collaborator

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",
Copy link
Collaborator

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 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants