Battery feature

event messageolympe.messages.battery.alert(alert=None, level=None, list_flags=None, _policy='check_wait', _float_tol=(1e-07, 1e-09))

Battery.Alert

Battery alerts

Parameters
  • alert (olympe.enums.battery.alert) – Alert.

  • level (olympe.enums.battery.alert_level) – Alert level.

  • list_flags (BitfieldOf(olympe.enums.battery.list_flags, u8)) –

  • _policy (olympe.arsdkng.expectations.ExpectPolicy) – specify how to check the expectation. Possible values are ‘check’, ‘wait’ and ‘check_wait’ (defaults to ‘check_wait’)

  • _float_tol (tuple) – specify the float comparison tolerance, a 2-tuple containing a relative tolerance float value and an absolute tolerate float value (default to (1e-07, 1e-09)). See python 3 stdlib math.isclose documentation for more information

Triggered when an alert level changes.

event messageolympe.messages.battery.health(state_of_health=None, _policy='check_wait', _float_tol=(1e-07, 1e-09))

Battery.Health

Battery Health

Parameters
  • state_of_health (u8) – Battery State-Of-Health (%)

  • _policy (olympe.arsdkng.expectations.ExpectPolicy) – specify how to check the expectation. Possible values are ‘check’, ‘wait’ and ‘check_wait’ (defaults to ‘check_wait’)

  • _float_tol (tuple) – specify the float comparison tolerance, a 2-tuple containing a relative tolerance float value and an absolute tolerate float value (default to (1e-07, 1e-09)). See python 3 stdlib math.isclose documentation for more information

Triggered when State-Of-Health changes.

event messageolympe.messages.battery.voltage(voltage=None, _policy='check_wait', _float_tol=(1e-07, 1e-09))

Battery.Voltage

Battery voltage.

Parameters
  • voltage (u16) – Battery voltage in mV

  • _policy (olympe.arsdkng.expectations.ExpectPolicy) – specify how to check the expectation. Possible values are ‘check’, ‘wait’ and ‘check_wait’ (defaults to ‘check_wait’)

  • _float_tol (tuple) – specify the float comparison tolerance, a 2-tuple containing a relative tolerance float value and an absolute tolerate float value (default to (1e-07, 1e-09)). See python 3 stdlib math.isclose documentation for more information

Triggered regularly.

enumolympe.enums.battery.alert

Battery alerts.

power_level

Power level is low. (0)

too_hot

Battery is too hot. (1)

too_cold

Battery is too cold. (2)

enumolympe.enums.battery.alert_level

Alert level.

none

Alert is not active. (0)

warning

Alert level is warning. (1)

critical

Alert level is critical. (2)

enumolympe.enums.battery.list_flags

Arsdk built-in “list_flags” enum that is used to in “LIST_ITEM” event messages

First

Arsdk built-in “list_flags” enum that is used to in “LIST_ITEM” event messages (0)

Last

Arsdk built-in “list_flags” enum that is used to in “LIST_ITEM” event messages (1)

Empty

Arsdk built-in “list_flags” enum that is used to in “LIST_ITEM” event messages (2)

Remove

Arsdk built-in “list_flags” enum that is used to in “LIST_ITEM” event messages (3)