battery

package
v1.0.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 5, 2022 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

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) Apply

func (c *ChargeLimit) Apply() error

Apply satisfies persist.Registry

func (*ChargeLimit) Close

func (c *ChargeLimit) Close() error

Close satisfied persist.Registry

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) Name

func (c *ChargeLimit) Name() string

Name 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

func (*ChargeLimit) Value

func (c *ChargeLimit) Value() []byte

Value satisfies persist.Registry

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL