States

Asset Tracker Template

tags
Asset Tracker Template
  • STATE_WAITING_FOR_MODEM_INIT: The initial state, where the system waits for the modem library to complete initialization before proceeding.
  • STATE_RUNNING: Parent state entered after modem initialization. At this level, battery sampling requests are handled regardless of the sub-state.

    • STATE_ACTIVE: Default sub-state of STATE_RUNNING. In this state, the fuel gauge is sampled periodically based on the timer controlled by CONFIG_APP_POWER_SAMPLE_INTERVAL_MS. It is entered when the modem wakes up from sleep.
    • STATE_IDLE: Sub-state entered when the modem enters sleep. Calls nrf_fuel_gauge_idle_set() with the configured idle current (CONFIG_APP_POWER_IDLE_CURRENT_NA) so the fuel gauge can estimate consumption while sampling is paused.