#include "cloud/cloud_communication.h"
#include "messages/message_manager.h"
#include "controller_connection_manager.h"
+#include "lap_counter/lap_counter.h"
#include "command.h"
#define ENABLE_MOTOR 1
unsigned int f_value;
unsigned int r_value;
unsigned int dir_state;
+ const char *user_name;
guint idle_h;
} app_data;
}
}
+static void __user_name_received_cb(const char *name) {
+ lap_counter_set_user_name(name);
+}
+
static void _initialize_config()
{
net_util_init();
cloud_communication_init();
message_manager_init();
controller_connection_manager_listen();
+ lap_counter_init();
}
static bool service_app_create(void *data)
cloud_communication_start(CLOUD_REQUESTS_FREQUENCY);
controller_connection_manager_set_command_received_cb(__command_received_cb);
+ controller_connection_manager_set_user_name_received_cb(__user_name_received_cb);
return true;
}
if (ad->idle_h)
g_source_remove(ad->idle_h);
-
+ lap_counter_shutdown();
controller_connection_manager_release();
message_manager_shutdown();