diff options
author | Michal Skorupinski <m.skorupinsk@samsung.com> | 2018-08-17 17:27:29 +0200 |
---|---|---|
committer | Michal Skorupinski <m.skorupinsk@samsung.com> | 2018-08-30 15:34:36 +0200 |
commit | 315643a97a05cf6227497ba8dda75f5711096654 (patch) | |
tree | 2f738313f449be036683b71fe20b3e1f2bde59bb /src/model/model_car_connection.c | |
parent | 4e68c88d6fe6c747f7fdfeba5542a446ffc5c691 (diff) | |
download | gear-racing-controller-315643a97a05cf6227497ba8dda75f5711096654.tar.gz gear-racing-controller-315643a97a05cf6227497ba8dda75f5711096654.tar.bz2 gear-racing-controller-315643a97a05cf6227497ba8dda75f5711096654.zip |
Network failure view switches to the Connect to car view
Change-Id: I0d513e73501d1ee91643acfd9c5fb77ddfe0f804
Signed-off-by: Michal Skorupinski <m.skorupinsk@samsung.com>
Diffstat (limited to 'src/model/model_car_connection.c')
-rw-r--r-- | src/model/model_car_connection.c | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/src/model/model_car_connection.c b/src/model/model_car_connection.c index dd5b261..660a326 100644 --- a/src/model/model_car_connection.c +++ b/src/model/model_car_connection.c @@ -26,7 +26,7 @@ #include "log.h" #define BASE_VALUE 100 -#define HELLO_TIMER_WAIT 15.0 +#define HELLO_TIMER_WAIT 3.0 typedef enum _e_message_type { MESSAGE_HELLO, @@ -105,25 +105,12 @@ static void _send_data(int command, int servo, int speed) static Eina_Bool _connection_wait_timer_cb(void *data) { - static bool test = false; - - static s_model_car_connection_cb_data model_data = { .type = MODEL_TYPE_FAIL, }; - if (test == false) { - model_data.type = MODEL_TYPE_FAIL; - } else { - model_data.type = MODEL_TYPE_END; - } - s_info.controller_update_cb(&model_data); - - if (test == false) { - test = true; - return ECORE_CALLBACK_RENEW; - } + model_car_connection_end_connection(); bool renew = (bool)data; return renew; |