2024-01-15 09:31:56 +11:00
|
|
|
use metrics::{describe_gauge, Unit};
|
2024-01-13 17:06:48 +11:00
|
|
|
|
|
|
|
mod gauge_names;
|
|
|
|
pub mod pl;
|
|
|
|
|
|
|
|
pub fn register_metrics() {
|
|
|
|
describe_gauge!(gauge_names::BATTERY_VOLTAGE, "Battery voltage");
|
|
|
|
describe_gauge!(gauge_names::TARGET_VOLTAGE, "Target voltage");
|
|
|
|
describe_gauge!(gauge_names::INPUT_CURRENT, "Internal charge current");
|
|
|
|
describe_gauge!(gauge_names::CHARGE_STATE, "Regulator state");
|
2024-01-15 09:31:56 +11:00
|
|
|
describe_gauge!(gauge_names::BATTERY_TEMP, "Battery temperature");
|
2024-01-13 17:06:48 +11:00
|
|
|
register_pl_metrics();
|
|
|
|
}
|
|
|
|
|
|
|
|
fn register_pl_metrics() {
|
2024-01-15 09:31:56 +11:00
|
|
|
describe_gauge!(gauge_names::PL_DUTY_CYCLE, Unit::Percent, "Duty cycle");
|
2024-01-13 17:06:48 +11:00
|
|
|
describe_gauge!(gauge_names::PL_LOAD_CURRENT, "Internal load current");
|
|
|
|
}
|