void deinit() {
  app_worker_send_message(ActionStop, NULL);
  app_worker_message_unsubscribe();
  health_service_events_unsubscribe();
  if (next_event_limit != NULL) {
    app_timer_cancel(next_event_limit);
  }
}
Ejemplo n.º 2
0
void handle_deinit() 
{
	INFO_LOG("Cleaning up on exit.");
	SavePersistedData();
	UnloadBackgroundImage();
	UnloadMainBmpImage();
	UnloadTextLayers();
	tick_timer_service_unsubscribe();
	app_focus_service_unsubscribe();
#if ALLOW_WORKER_APP
	AppDying(ClosingWhileInBattle());
	app_worker_message_unsubscribe();
#endif
}
Ejemplo n.º 3
0
static void handle_deinit(void) {
    accel_data_service_unsubscribe();
    hide_sleep_window();

    // We are already in background capturing the sleep

    // if (get_config()->status == STATUS_ACTIVE) {
    //     set_config_status(STATUS_NOTACTIVE);
    //     notify_status_update(get_config()->status);
    // }

    // No more worker updates
    app_worker_message_unsubscribe();

    freeLogic();
}
Ejemplo n.º 4
0
static void worker_deinit() {
  	data_logging_finish(datalog_ref);
	tick_timer_service_unsubscribe();
	accel_data_service_unsubscribe();
	app_worker_message_unsubscribe();
}