@@ -51,7 +51,7 @@ mat3 update_calibration(Eigen::Matrix<float, 3, 4> &extrinsics, bool wide_camera
5151 return matmul3 (yuv_transform, transform);
5252}
5353
54- void run_model (ModelState &model, VisionIpcClient &vipc_client_main, VisionIpcClient &vipc_client_extra, bool main_wide_camera, bool use_extra, bool use_extra_client) {
54+ void run_model (ModelState &model, VisionIpcClient &vipc_client_main, VisionIpcClient &vipc_client_extra, bool main_wide_camera, bool use_extra_client) {
5555 // messaging
5656 PubMaster pm ({" modelV2" , " cameraOdometry" });
5757 SubMaster sm ({" lateralPlan" , " roadCameraState" , " liveCalibration" });
@@ -134,9 +134,7 @@ void run_model(ModelState &model, VisionIpcClient &vipc_client_main, VisionIpcCl
134134 }
135135
136136 model_transform_main = update_calibration (extrinsic_matrix_eigen, main_wide_camera, false );
137- if (use_extra) {
138- model_transform_extra = update_calibration (extrinsic_matrix_eigen, Hardware::TICI (), true );
139- }
137+ model_transform_extra = update_calibration (extrinsic_matrix_eigen, Hardware::TICI (), true );
140138 live_calib_seen = true ;
141139 }
142140
@@ -181,16 +179,15 @@ int main(int argc, char **argv) {
181179 }
182180
183181 bool main_wide_camera = Hardware::TICI () ? Params ().getBool (" EnableWideCamera" ) : false ;
184- bool use_extra = USE_EXTRA;
185- bool use_extra_client = Hardware::TICI () && use_extra && !main_wide_camera;
182+ bool use_extra_client = Hardware::TICI () && !main_wide_camera;
186183
187184 // cl init
188185 cl_device_id device_id = cl_get_device_id (CL_DEVICE_TYPE_DEFAULT);
189186 cl_context context = CL_CHECK_ERR (clCreateContext (NULL , 1 , &device_id, NULL , NULL , &err));
190187
191188 // init the models
192189 ModelState model;
193- model_init (&model, device_id, context, use_extra );
190+ model_init (&model, device_id, context);
194191 LOGW (" models loaded, modeld starting" );
195192
196193 VisionIpcClient vipc_client_main = VisionIpcClient (" camerad" , main_wide_camera ? VISION_STREAM_WIDE_ROAD : VISION_STREAM_ROAD, true , device_id, context);
@@ -215,7 +212,7 @@ int main(int argc, char **argv) {
215212 LOGW (" connected extra cam with buffer size: %d (%d x %d)" , wb->len , wb->width , wb->height );
216213 }
217214
218- run_model (model, vipc_client_main, vipc_client_extra, main_wide_camera, use_extra, use_extra_client);
215+ run_model (model, vipc_client_main, vipc_client_extra, main_wide_camera, use_extra_client);
219216 }
220217
221218 model_free (&model);
0 commit comments