Update battery.c

fixed the comments
This commit is contained in:
Darryldh 2021-08-05 20:09:40 -04:00
parent 9f995ed744
commit 09c015b7f2

View file

@ -110,7 +110,7 @@ static int zmk_battery_update(const struct device *battery) {
LOG_DBG("The configured battery sensor does not support the channel: Voltage");
} else {
/* append this value to the battery state changed event */
bat_state_data.voltage = voltage.val1; /*combine val1" and "val2" here*/
bat_state_data.voltage = voltage.val1; /*combine val1 and val2 here*/
LOG_DBG("-----> battery voltage: %d.%dV", voltage.val1, voltage.val2);
}
@ -125,7 +125,7 @@ static int zmk_battery_update(const struct device *battery) {
LOG_DBG("The battery sensor does not support the channel: Average Current");
} else {
/* append this value to the battery state changed event */
bat_state_data.current = current.val1; /*combine val1" and "val2" here*/
bat_state_data.current = current.val1; /*combine val1 and val2 here*/
LOG_DBG("-----> battery Average Current: %d.%dA", current.val1, current.val2);
}
@ -140,7 +140,7 @@ static int zmk_battery_update(const struct device *battery) {
LOG_DBG("The battery sensor does not support the channel: Standby Current");
} else {
/* append this value to the battery state changed event */
bat_state_data.current_standby = current_standby.val1; /*combine val1" and "val2" here*/
bat_state_data.current_standby = current_standby.val1; /*combine val1 and val2 here*/
LOG_DBG("-----> battery Standby Current: %d.%dA", current_standby.val1,
current_standby.val2);
}
@ -156,7 +156,7 @@ static int zmk_battery_update(const struct device *battery) {
LOG_DBG("The battery sensor does not support the channel: Maximum Load Current");
} else {
/* append this value to the battery state changed event */
bat_state_data.current_max_load = current_max_load.val1; /*combine val1" and "val2" here*/
bat_state_data.current_max_load = current_max_load.val1; /*combine val1 and val2 here*/
LOG_DBG("-----> battery Maximum Load Current: %d.%dA", current_max_load.val1,
current_max_load.val2);
}
@ -172,7 +172,7 @@ static int zmk_battery_update(const struct device *battery) {
LOG_DBG("The battery sensor does not support the channel: Full Charge Capacity");
} else {
/* append this value to the battery state changed event */
bat_state_data.full_charge_capacity = full_charge_capacity.val1; /*combine val1" and "val2" here*/
bat_state_data.full_charge_capacity = full_charge_capacity.val1; /*combine val1 and val2 here*/
LOG_DBG("-----> battery Full Charge Capacity: %d.%dmAh", full_charge_capacity.val1,
full_charge_capacity.val2);
}
@ -188,7 +188,7 @@ static int zmk_battery_update(const struct device *battery) {
LOG_DBG("The battery sensor does not support the channel: Remaining Charge Capacity");
} else {
/* append this value to the battery state changed event */
bat_state_data.remaining_charge_capacity = remaining_charge_capacity.val1; /*combine val1" and "val2" here*/
bat_state_data.remaining_charge_capacity = remaining_charge_capacity.val1; /*combine val1 and val2 here*/
LOG_DBG("-----> battery Remaining Charge Capacity: %d.%dmAh", remaining_charge_capacity.val1,
remaining_charge_capacity.val2);
}
@ -204,7 +204,7 @@ static int zmk_battery_update(const struct device *battery) {
LOG_DBG("The battery sensor does not support the channel: Nominal Available Capacity");
} else {
/* append this value to the battery state changed event */
bat_state_data.nominal_available_capacity = nominal_available_capacity.val1; /*combine val1" and "val2" here*/
bat_state_data.nominal_available_capacity = nominal_available_capacity.val1; /*combine val1 and val2 here*/
LOG_DBG("-----> battery Nominal Available Capacity: %d.%dmAh", nominal_available_capacity.val1,
nominal_available_capacity.val2);
}
@ -220,7 +220,7 @@ static int zmk_battery_update(const struct device *battery) {
LOG_DBG("The battery sensor does not support the channel: Full Available Capacity");
} else {
/* append this value to the battery state changed event */
bat_state_data.full_available_capacity = full_available_capacity.val1; /*combine val1" and "val2" here*/
bat_state_data.full_available_capacity = full_available_capacity.val1; /*combine val1 and val2 here*/
LOG_DBG("-----> battery Full Available Capacity: %d.%dmAh", full_available_capacity.val1,
full_available_capacity.val2);
}
@ -236,7 +236,7 @@ static int zmk_battery_update(const struct device *battery) {
LOG_DBG("The battery sensor does not support the channel: Average Power Usage");
} else {
/* append this value to the battery state changed event */
bat_state_data.avg_power = avg_power.val1; /*combine val1" and "val2" here*/
bat_state_data.avg_power = avg_power.val1; /*combine val1 and val2 here*/
LOG_DBG("-----> battery Average Power Usage: %d.%dmW", avg_power.val1, avg_power.val2);
}
@ -251,7 +251,7 @@ static int zmk_battery_update(const struct device *battery) {
LOG_DBG("The battery sensor does not support the channel: Internal IC Temperature");
} else {
/* append this value to the battery state changed event */
bat_state_data.int_temp = int_temp.val1; /*combine val1" and "val2" here*/
bat_state_data.int_temp = int_temp.val1; /*combine val1 and val2 here*/
LOG_DBG("-----> battery Internal IC Temperature: %d.%d C", int_temp.val1, int_temp.val2);
}