Fix WM connection sandbox/akiofukubayashi/als2019
authorfukubayashi.akio <fukubayashi.akio@genetec.co.jp>
Thu, 11 Jul 2019 09:05:45 +0000 (18:05 +0900)
committerfukubayashi.akio <fukubayashi.akio@genetec.co.jp>
Thu, 11 Jul 2019 09:05:45 +0000 (18:05 +0900)
Signed-off-by: fukubayashi.akio <fukubayashi.akio@genetec.co.jp>
policy_manager/config/roles.json.zipc.split
src/config/areas.json
src/window_manager.cpp
src/wm_connection.cpp

index eee2156..7708845 100644 (file)
@@ -50,7 +50,7 @@
                 },
                 {
                     "category": "tbt",
-                    "role": "tbtnavi | tbtnavi2 | dashboard",
+                    "role": "tbtnavi",
                     "area": "master.split.sub",
                     "layer": "remote",
                 },
                 },
                 {
                     "category": "tbt",
-                    "role": "tbtnavi",
-                    "area": "master.split.sub",
+                    "role": "tbtnavi | hudtbt",
+                    "area": "master.split.sub | hud.normal.full",
                     "layer": "remote",
                 },
                 {
                 },
                 {
                     "category": "general",
-                    "role": "video | music | sdl_bt | webbrowser | eb | poi | browser | mixer | radio | hvac | debug | phone | settings | hvac | hudtbt | tbtnavi | tbtnavi2 | dashboard",
+                    "role": "hudtbt",
                     "area": "hud.normal.full",
                     "layer": "remote_hud",
                 },
                 {
                     "category": "speed",
-                    "role": "tachometer | speed | hudspeed",
+                    "role": "hudspeed",
                     "area": "hud.upper.left",
                     "layer": "remote_hud_upper_left",
                 }
index 1fb85b7..d63e046 100644 (file)
                             "rect": {
                                 "x": 0,
                                 "y": 0,
-                                "w": 480,
+                                "w": 240,
                                 "h": 180
                             }
                         }
                         {
                             "name": "upper.left",
                             "rect": {
-                                "x": 0,
-                                "y": 0,
-                                "w": 480,
+                                "x": 480,
+                                "y": 450,
+                                "w": 240,
                                 "h": 180
                             }
                         },
                             "rect": {
                                 "x": 0,
                                 "y": 0,
-                                "w": 480,
+                                "w": 240,
                                 "h": 180
                             }
                         }
index 52a7144..6955131 100644 (file)
@@ -529,6 +529,7 @@ void WindowManager::api_activate_window(char const *appid, char const *drawing_n
     // g_app_list.removeFloatingSurface(client);i
     unsigned layer = client->layerID();
 
+#if 0
     //TODO  Deactivate remote viewing app for remote view change to local view.
     if(this->lc->hasRemoteLayer(layer) != "" && this->wmcon.getAppIdToEcuName(appid) != "")
     {
@@ -557,6 +558,7 @@ void WindowManager::api_activate_window(char const *appid, char const *drawing_n
         this->emit_invisible(role);
         this->emit_deactivated(role);
     }
+#endif
 
     Task task = Task::TASK_ALLOCATE;
     unsigned req_num = 0;
@@ -692,7 +694,7 @@ void WindowManager::api_activate_surface_to_master(
     // g_app_list.removeFloatingSurface(client);
 
     unsigned layer = client->layerID();
-
+#if 0
     //TODO  Deactivate remote viewing app for remote view change to local view.
     if(this->lc->hasRemoteLayer(layer) != "" && this->wmcon.getAppIdToEcuName(appid) != "")
     {
@@ -721,7 +723,7 @@ void WindowManager::api_activate_surface_to_master(
         this->emit_invisible(role);
         this->emit_deactivated(role);
     }
-
+#endif
     Task task = Task::TASK_ALLOCATE;
     unsigned req_num = 0;
     WMError ret = WMError::UNKNOWN;
index 16bb2d6..3600cd4 100644 (file)
@@ -557,7 +557,7 @@ int WMConnection::connectToEcu()
         std::string ecu_name = itr->first;
         HMI_DEBUG("ECU Names %s", ecu_name.c_str());
 
-        if (itr->second.connectedSocket() != -1 || !itr->second.masterMode())
+        if (itr->second.connectedSocket() != -1 || itr->first == this->ecu_name)
         {
             cnt++;
             HMI_DEBUG("Already Connected");
@@ -569,6 +569,9 @@ int WMConnection::connectToEcu()
             HMI_DEBUG("Try Connection");
             connectToServer(ecu_name);
         }
+
+        HMI_DEBUG("Wait Connection");
+
     }
 
     if (cnt == (int)this->wm_socket.size())