Skip to content

Commit

Permalink
Clean up and reorg debug messages
Browse files Browse the repository at this point in the history
  • Loading branch information
ev-mp authored and Evgeni Raikhel committed Nov 5, 2022
1 parent 619ad03 commit 491d1d0
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 68 deletions.
11 changes: 0 additions & 11 deletions common/on-chip-calib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -865,7 +865,6 @@ namespace rs2

void on_chip_calib_manager::calibrate()
{
std::cout << __FUNCTION__ << " was called" << std::endl;
int occ_timeout_ms = 9000;
if (action == RS2_CALIB_ACTION_ON_CHIP_OB_CALIB || action == RS2_CALIB_ACTION_ON_CHIP_FL_CALIB)
{
Expand Down Expand Up @@ -1343,12 +1342,6 @@ namespace rs2

void on_chip_calib_manager::process_flow(std::function<void()> cleanup, invoker invoke)
{
static auto_calib_action prev_action = RS2_CALIB_ACTION_ON_CHIP_OB_CALIB;
if (prev_action != action)
{
prev_action = action;
LOG_WARNING(std::string(to_string() << __LINE__ << " action = " << action ));
}
if (action == RS2_CALIB_ACTION_FL_CALIB || action == RS2_CALIB_ACTION_UVMAPPING_CALIB || action == RS2_CALIB_ACTION_FL_PLUS_CALIB)
stop_viewer(invoke);

Expand Down Expand Up @@ -2437,7 +2430,6 @@ namespace rs2
{
get_manager().apply_calib(true); // Store the new calibration internally
get_manager().keep(); // Flash the new calibration
LOG_WARNING(std::string(to_string() << __LINE__ << " new calib applied and flashed"));
if (RS2_CALIB_STATE_UVMAPPING_INPUT == update_state)
get_manager().reset_device(); // Workaround for reloading color calibration table. Other approach?

Expand Down Expand Up @@ -2824,7 +2816,6 @@ namespace rs2
{
use_new_calib = true;
get_manager().apply_calib(true);
LOG_WARNING(std::string(to_string() << __LINE__ << " new calib applied"));
}

ImGui::SetCursorScreenPos({ float(x + 150), (get_manager().action == on_chip_calib_manager::RS2_CALIB_ACTION_ON_CHIP_OB_CALIB || get_manager().action == on_chip_calib_manager::RS2_CALIB_ACTION_FL_CALIB ? float(y + 70) + ImGui::GetTextLineHeightWithSpacing() : (get_manager().action == on_chip_calib_manager::RS2_CALIB_ACTION_TARE_CALIB ? (get_manager().tare_health ? float(y + 70) : float(y + 15)) + ImGui::GetTextLineHeightWithSpacing() : float(y + 70))) });
Expand Down Expand Up @@ -2981,7 +2972,6 @@ namespace rs2
{
get_manager().apply_calib(true);
use_new_calib = true;
LOG_WARNING(std::string(to_string() << __LINE__ << " new calib applied"));
}
}

Expand Down Expand Up @@ -3071,7 +3061,6 @@ namespace rs2

ImGui::PushStyleColor(ImGuiCol_TextSelectedBg, regular_blue);
auto s = update_manager->get_log();
rs2::log(RS2_LOG_SEVERITY_INFO, s.c_str());
ImGui::InputTextMultiline("##autocalib_log", const_cast<char*>(s.c_str()),
s.size() + 1, { 490,100 }, ImGuiInputTextFlags_AutoSelectAll | ImGuiInputTextFlags_ReadOnly);
ImGui::PopStyleColor();
Expand Down
Loading

0 comments on commit 491d1d0

Please sign in to comment.