@@ -1428,6 +1428,10 @@ namespace rs2
1428
1428
if (action == RS2_CALIB_ACTION_FL_CALIB || action == RS2_CALIB_ACTION_UVMAPPING_CALIB || action == RS2_CALIB_ACTION_FL_PLUS_CALIB)
1429
1429
stop_viewer (invoke);
1430
1430
1431
+ if ( action == RS2_CALIB_ACTION_ON_CHIP_CALIB || action == RS2_CALIB_ACTION_TARE_CALIB )
1432
+ if ( _model.is_color_streaming () )
1433
+ throw std::runtime_error ( " Turn off RGB Camera streaming before calibrating." );
1434
+
1431
1435
update_last_used ();
1432
1436
1433
1437
if (action == RS2_CALIB_ACTION_ON_CHIP_FL_CALIB || action == RS2_CALIB_ACTION_FL_CALIB)
@@ -2192,39 +2196,30 @@ namespace rs2
2192
2196
// if (ImGui::IsItemHovered())
2193
2197
// RsImGui::CustomTooltip("%s", "On-Chip Calibration Extended");
2194
2198
2195
- if ( get_manager ().get_device_model ().is_color_streaming () )
2196
- {
2197
- dismiss (false );
2198
- ImGui::PopStyleColor (7 );
2199
- ImGui::PopFont ();
2200
- throw std::runtime_error (" Turn off \" RGB Camera\" streaming before using on-chip calibration." );
2201
- }
2202
- else
2203
- {
2204
- auto sat = 1 .f + sin (duration_cast<milliseconds>(system_clock::now () - created_time).count () / 700 .f ) * 0 .1f ;
2205
- ImGui::PushStyleColor (ImGuiCol_Button, saturate (sensor_header_light_blue, sat));
2206
- ImGui::PushStyleColor (ImGuiCol_ButtonHovered, saturate (sensor_header_light_blue, 1 .5f ));
2207
-
2208
- std::string button_name = rsutils::string::from () << " Calibrate" << " ##self" << index ;
2209
2199
2210
- ImGui::SetCursorScreenPos ({ float (x + 5 ), float (y + height - 28 ) });
2211
- if (ImGui::Button (button_name.c_str (), { float (bar_width), 20 .f }))
2212
- {
2213
- get_manager ().restore_workspace ([this ](std::function<void ()> a) { a (); });
2214
- get_manager ().reset ();
2215
- get_manager ().retry_times = 0 ;
2216
- auto _this = shared_from_this ();
2217
- auto invoke = [_this](std::function<void ()> action) {_this->invoke (action); };
2218
- get_manager ().start (invoke);
2219
- update_state = RS2_CALIB_STATE_CALIB_IN_PROCESS;
2220
- enable_dismiss = false ;
2221
- }
2200
+ auto sat = 1 .f + sin (duration_cast<milliseconds>(system_clock::now () - created_time).count () / 700 .f ) * 0 .1f ;
2201
+ ImGui::PushStyleColor (ImGuiCol_Button, saturate (sensor_header_light_blue, sat));
2202
+ ImGui::PushStyleColor (ImGuiCol_ButtonHovered, saturate (sensor_header_light_blue, 1 .5f ));
2222
2203
2223
- ImGui::PopStyleColor ( 2 ) ;
2204
+ std::string button_name = rsutils::string::from () << " Calibrate " << " ##self " << index ;
2224
2205
2225
- if (ImGui::IsItemHovered ())
2226
- RsImGui::CustomTooltip (" %s" , " Begin On-Chip Calibration" );
2206
+ ImGui::SetCursorScreenPos ({ float (x + 5 ), float (y + height - 28 ) });
2207
+ if (ImGui::Button (button_name.c_str (), { float (bar_width), 20 .f }))
2208
+ {
2209
+ get_manager ().restore_workspace ([this ](std::function<void ()> a) { a (); });
2210
+ get_manager ().reset ();
2211
+ get_manager ().retry_times = 0 ;
2212
+ auto _this = shared_from_this ();
2213
+ auto invoke = [_this](std::function<void ()> action) {_this->invoke (action);};
2214
+ get_manager ().start (invoke);
2215
+ update_state = RS2_CALIB_STATE_CALIB_IN_PROCESS;
2216
+ enable_dismiss = false ;
2227
2217
}
2218
+
2219
+ ImGui::PopStyleColor (2 );
2220
+
2221
+ if (ImGui::IsItemHovered ())
2222
+ RsImGui::CustomTooltip (" %s" , " Begin On-Chip Calibration" );
2228
2223
}
2229
2224
else if (update_state == RS2_CALIB_STATE_FL_INPUT)
2230
2225
{
0 commit comments