personal_state - Personal State

The personal_state module allows you to set and get the card10 users personal state from your script. The personal state is displayed on the top-left LED on the bottom of the harmonics board. While the personal state is set the LED can’t be controlled by the leds module.

Example:

import personal_state

# Enable the "camp" state only while the app is running.
personal_state.set(personal_state.CAMP, False)

# Enable the "chaos" state and keep it after the app exits.
personal_state.set(personal_state.CHAOS, True)

# Query the currently configured state and if it's persistent.
state, persistent = personal_state.get()

# Clear the currently configured state
personal_state.clear()
personal_state.set(state, persistent)

Set the users personal state.

Parameters
personal_state.clear()

Clears a previously set personal state.

If no personal state was set this function does nothing. It does not matter if a set state is marked as persistent or not.

personal_state.get()

Get the users personal state.

Returns

A tuple containing the currently set state and a boolean indicating if it’s persistent or not.

personal_state.NO_STATE

State ID reported when no personal state is set.

personal_state.NO_CONTACT

State ID for the “No Contact” personal state.

personal_state.CHAOS

State ID for the “Chaos” personal state.

personal_state.COMMUNICATION

State ID for the “Communicatoin” personal state.

personal_state.CAMP

State ID for the “Camp” personal state.