Skip to content
This repository was archived by the owner on Jan 18, 2024. It is now read-only.
This repository was archived by the owner on Jan 18, 2024. It is now read-only.

Add hal::state_of_charge interface #678

@kammce

Description

@kammce

This interface represents a batteries state of charge, meaning the percentage of charge left before the battery is no longer usable.

The interface could look something like this:

class state_of_charge {
  /** Returns a percentage value. Negative values are possible and these 
   * represent under charge conditions beyond a safe point for a charge 
   * storing device. Above +1.0 (100%) means over charge above a safe 
   * point for a charge storing device.
   */
  result<float> read() { /* ... */ }
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    📜 interfaceapis abstraction for hardware

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions