Skip to content

Commit

Permalink
Merge pull request IntelRealSense#4309 from ev-mp/candidate
Browse files Browse the repository at this point in the history
Display FW Update option for D400 and SR300 only
  • Loading branch information
ev-mp authored Jun 27, 2019
2 parents bb2d64e + 5084f24 commit 3eecfe1
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 21 deletions.
43 changes: 23 additions & 20 deletions common/model-views.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4005,31 +4005,34 @@ namespace rs2
}
}

if (ImGui::Selectable("Update Firmware..."))
if (dev.is<rs2::updatable>() || dev.is<rs2::update_device>())
{
begin_update({}, viewer, error_message);
}
if (ImGui::IsItemHovered())
ImGui::SetTooltip("Install official signed firmware from file to the device");
if (ImGui::Selectable("Update Firmware..."))
{
begin_update({}, viewer, error_message);
}
if (ImGui::IsItemHovered())
ImGui::SetTooltip("Install official signed firmware from file to the device");

if ((dev.supports(RS2_CAMERA_INFO_PRODUCT_LINE)) ||
(dev.query_sensors().size() && dev.query_sensors().front().supports(RS2_CAMERA_INFO_PRODUCT_LINE)))
if (ImGui::Selectable("Install Recommended Firmware "))
{
auto sensors = dev.query_sensors();
auto product_line_str = "";
if (dev.supports(RS2_CAMERA_INFO_PRODUCT_LINE))
product_line_str = dev.get_info(RS2_CAMERA_INFO_PRODUCT_LINE);
if (sensors.size() && sensors.front().supports(RS2_CAMERA_INFO_PRODUCT_LINE))
product_line_str = sensors.front().get_info(RS2_CAMERA_INFO_PRODUCT_LINE);
int product_line = parse_product_line(product_line_str);
if ((dev.supports(RS2_CAMERA_INFO_PRODUCT_LINE)) ||
(dev.query_sensors().size() && dev.query_sensors().front().supports(RS2_CAMERA_INFO_PRODUCT_LINE)))
if (ImGui::Selectable("Install Recommended Firmware "))
{
auto sensors = dev.query_sensors();
auto product_line_str = "";
if (dev.supports(RS2_CAMERA_INFO_PRODUCT_LINE))
product_line_str = dev.get_info(RS2_CAMERA_INFO_PRODUCT_LINE);
if (sensors.size() && sensors.front().supports(RS2_CAMERA_INFO_PRODUCT_LINE))
product_line_str = sensors.front().get_info(RS2_CAMERA_INFO_PRODUCT_LINE);
int product_line = parse_product_line(product_line_str);

static auto table = create_default_fw_table();
static auto table = create_default_fw_table();

begin_update(table[product_line], viewer, error_message);
begin_update(table[product_line], viewer, error_message);
}
if (ImGui::IsItemHovered())
ImGui::SetTooltip("Install default recommended firmware for this device");
}
if (ImGui::IsItemHovered())
ImGui::SetTooltip("Install default recommended firmware for this device");
}

if (!something_to_show)
Expand Down
2 changes: 1 addition & 1 deletion common/realsense-ui-advanced-mode.h
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,7 @@ inline void draw_advanced_mode_controls(rs400::advanced_mode& advanced,

auto to_set = false;

slider_float(error_message, "Amplitude Factor", amc.amp_factor.vals, &STAFactor::amplitude, to_set);
slider_float(error_message, "A Factor", amc.amp_factor.vals, &STAFactor::amplitude, to_set);

ImGui::PopItemWidth();

Expand Down

0 comments on commit 3eecfe1

Please sign in to comment.