Documentation ¶
Index ¶
- type ChargeLimit
- func (c *ChargeLimit) Apply() error
- func (c *ChargeLimit) Close() error
- func (c *ChargeLimit) CurrentLimit() uint8
- func (c *ChargeLimit) GetWSInfo() gin.H
- func (c *ChargeLimit) HandleWSMessage(ws *websocket.Conn, action int, value string)
- func (c *ChargeLimit) Load(v []byte) error
- func (c *ChargeLimit) Name() string
- func (c *ChargeLimit) Set(pct uint8) error
- func (c *ChargeLimit) Value() []byte
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChargeLimit ¶
type ChargeLimit struct {
// contains filtered or unexported fields
}
ChargeLimit allows you to limit the full charge percentage on your laptop
func NewChargeLimit ¶
func NewChargeLimit(wmi atkacpi.WMI) (*ChargeLimit, error)
NewChargeLimit initializes the control interface and returns an instance of ChargeLimit
func (*ChargeLimit) CurrentLimit ¶
func (c *ChargeLimit) CurrentLimit() uint8
func (*ChargeLimit) GetWSInfo ¶
func (c *ChargeLimit) GetWSInfo() gin.H
func (*ChargeLimit) HandleWSMessage ¶
func (c *ChargeLimit) HandleWSMessage(ws *websocket.Conn, action int, value string)
func (*ChargeLimit) Load ¶
func (c *ChargeLimit) Load(v []byte) error
Load satisfies persist.Registry
func (*ChargeLimit) Set ¶
func (c *ChargeLimit) Set(pct uint8) error
Set will write to ACPI and set the battery charge limit in percentage. Note that the minimum percentage is 40
Click to show internal directories.
Click to hide internal directories.