/[zanavi_public1]/navit/navit/android/src/com/zoffcc/applications/zanavi/NavitVehicle.java
ZANavi

Diff of /navit/navit/android/src/com/zoffcc/applications/zanavi/NavitVehicle.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 49 Revision 50
1078 // request tunnel extrapolation from C code ------------------ 1078 // request tunnel extrapolation from C code ------------------
1079 // request tunnel extrapolation from C code ------------------ 1079 // request tunnel extrapolation from C code ------------------
1080 1080
1081 String extrapolated_post_string = NavitGraphics.CallbackGeoCalc(12, 1, interval_millis); 1081 String extrapolated_post_string = NavitGraphics.CallbackGeoCalc(12, 1, interval_millis);
1082 1082
1083 if (extrapolated_post_string.equals("*ERROR*")) 1083 if (extrapolated_post_string == null)
1084 { 1084 {
1085 System.out.println("extrapolated pos:*ERROR*"); 1085 System.out.println("extrapolated pos:*ERROR.1*");
1086 }
1087 else if (extrapolated_post_string.equals("*ERROR*"))
1088 {
1089 System.out.println("extrapolated pos:*ERROR.2*");
1086 } 1090 }
1087 else 1091 else
1088 { 1092 {
1089 try 1093 try
1090 { 1094 {
1129 1133
1130 static synchronized void turn_on_tunnel_extrapolation() 1134 static synchronized void turn_on_tunnel_extrapolation()
1131 { 1135 {
1132 // if (Navit.METHOD_DEBUG) Navit.my_func_name(0); 1136 // if (Navit.METHOD_DEBUG) Navit.my_func_name(0);
1133 1137
1138 if (Navit.CIDEBUG == 0)
1139 {
1140
1134 if (!Navit.tunnel_extrapolation) 1141 if (!Navit.tunnel_extrapolation)
1135 { 1142 {
1136 if (te_thread != null) 1143 if (te_thread != null)
1137 { 1144 {
1138 try 1145 try
1139 { 1146 {
1140 // try to clean up old thread 1147 // try to clean up old thread
1141 te_thread.stop_me(); 1148 te_thread.stop_me();
1142 te_thread = null; 1149 te_thread = null;
1143 } 1150 }
1144 catch (Exception e) 1151 catch (Exception e)
1145 { 1152 {
1146 e.printStackTrace(); 1153 e.printStackTrace();
1147 } 1154 }
1148 } 1155 }
1149 1156
1150 te_thread = new TunnelExtrapolationThread(); 1157 te_thread = new TunnelExtrapolationThread();
1151 te_thread.start(); 1158 te_thread.start();
1152 } 1159 }
1153 Navit.tunnel_extrapolation = true; 1160 Navit.tunnel_extrapolation = true;
1161
1162 }
1154 1163
1155 // if (Navit.METHOD_DEBUG) Navit.my_func_name(1); 1164 // if (Navit.METHOD_DEBUG) Navit.my_func_name(1);
1156 } 1165 }
1157 1166
1158 static synchronized void turn_off_tunnel_extrapolation() 1167 static synchronized void turn_off_tunnel_extrapolation()
1159 { 1168 {
1160 // if (Navit.METHOD_DEBUG) Navit.my_func_name(0); 1169 // if (Navit.METHOD_DEBUG) Navit.my_func_name(0);
1161 1170
1171 if (Navit.CIDEBUG == 0)
1172 {
1173
1162 if (Navit.tunnel_extrapolation) 1174 if (Navit.tunnel_extrapolation)
1163 { 1175 {
1164 if (te_thread != null) 1176 if (te_thread != null)
1165 { 1177 {
1166 try 1178 try
1167 { 1179 {
1168 // try to stop thread 1180 // try to stop thread
1169 te_thread.stop_me(); 1181 te_thread.stop_me();
1170 te_thread = null; 1182 te_thread = null;
1171 } 1183 }
1172 catch (Exception e) 1184 catch (Exception e)
1173 { 1185 {
1174 e.printStackTrace(); 1186 e.printStackTrace();
1175 } 1187 }
1176 } 1188 }
1177 } 1189 }
1178 Navit.tunnel_extrapolation = false; 1190 Navit.tunnel_extrapolation = false;
1191
1192 }
1179 1193
1180 // if (Navit.METHOD_DEBUG) Navit.my_func_name(1); 1194 // if (Navit.METHOD_DEBUG) Navit.my_func_name(1);
1181 } 1195 }
1182 1196
1183 public static void turn_off_all_providers() 1197 public static void turn_off_all_providers()

Legend:
Removed from v.49  
changed lines
  Added in v.50

   
Visit the ZANavi Wiki