Skip to content

Commit

Permalink
Disable recommended version for the SR300 family
Browse files Browse the repository at this point in the history
  • Loading branch information
dorodnic committed Sep 16, 2019
1 parent ba2f007 commit ce53f6e
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 12 deletions.
12 changes: 6 additions & 6 deletions common/fw-update-helper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,11 @@ namespace rs2
RS2_FWU_STATE_FAILED = 3,
};

bool is_recommended_fw_available()
bool is_recommended_fw_available(std::string id)
{
return !(strcmp("", FW_D4XX_FW_IMAGE_VERSION) == 0);
auto pl = parse_product_line(id);
auto fv = get_available_firmware_version(pl);
return !(fv == "");
}

int parse_product_line(std::string id)
Expand All @@ -56,8 +58,6 @@ namespace rs2

if (product_line == RS2_PRODUCT_LINE_D400 && allow_rc_firmware) return FW_D4XX_RC_IMAGE_VERSION;
else if (product_line == RS2_PRODUCT_LINE_D400) return FW_D4XX_FW_IMAGE_VERSION;
// NOTE: For now removing recommended firmware version for SR30x series
// TODO: Re-enable in future release
//else if (product_line == RS2_PRODUCT_LINE_SR300) return FW_SR3XX_FW_IMAGE_VERSION;
else return "";
}
Expand Down Expand Up @@ -439,7 +439,7 @@ namespace rs2

void fw_update_notification_model::draw_expanded(ux_window& win, std::string& error_message)
{
if (update_manager->started() && update_state == RS2_FWU_STATE_INITIAL_PROMPT)
if (update_manager->started() && update_state == RS2_FWU_STATE_INITIAL_PROMPT)
update_state = RS2_FWU_STATE_IN_PROGRESS;

auto flags = ImGuiWindowFlags_NoResize |
Expand Down Expand Up @@ -550,4 +550,4 @@ namespace rs2

pinned = true;
}
}
}
2 changes: 1 addition & 1 deletion common/fw-update-helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace rs2
std::map<int, std::vector<uint8_t>> create_default_fw_table();
std::vector<int> parse_fw_version(const std::string& fw);
bool is_upgradeable(const std::string& curr, const std::string& available);
bool is_recommended_fw_available();
bool is_recommended_fw_available(std::string version);

class firmware_update_manager : public process_manager
{
Expand Down
4 changes: 1 addition & 3 deletions common/model-views.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4328,9 +4328,7 @@ namespace rs2
if (ImGui::IsItemHovered())
ImGui::SetTooltip("Install official signed firmware from file to the device");

if (is_recommended_fw_available() &&
((dev.supports(RS2_CAMERA_INFO_PRODUCT_LINE)) ||
(dev.query_sensors().size() && dev.query_sensors().front().supports(RS2_CAMERA_INFO_PRODUCT_LINE))))
if (dev.supports(RS2_CAMERA_INFO_PRODUCT_LINE) && is_recommended_fw_available(dev.get_info(RS2_CAMERA_INFO_PRODUCT_LINE)))
{
if (ImGui::Selectable("Install Recommended Firmware "))
{
Expand Down
4 changes: 2 additions & 2 deletions src/ivcam/sr300.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ namespace librealsense
enable_timestamp(true, true);

auto pid_hex_str = hexify(color.pid);
auto recommended_fw_version = firmware_version(SR3XX_RECOMMENDED_FIRMWARE_VERSION);
//auto recommended_fw_version = firmware_version(SR3XX_RECOMMENDED_FIRMWARE_VERSION);

register_info(RS2_CAMERA_INFO_NAME, device_name);
register_info(RS2_CAMERA_INFO_SERIAL_NUMBER, serial);
Expand All @@ -292,7 +292,7 @@ namespace librealsense
register_info(RS2_CAMERA_INFO_PRODUCT_ID, pid_hex_str);
register_info(RS2_CAMERA_INFO_PRODUCT_LINE, "SR300");
register_info(RS2_CAMERA_INFO_CAMERA_LOCKED, _is_locked ? "YES" : "NO");
register_info(RS2_CAMERA_INFO_RECOMMENDED_FIRMWARE_VERSION, recommended_fw_version);
//register_info(RS2_CAMERA_INFO_RECOMMENDED_FIRMWARE_VERSION, recommended_fw_version);

register_autorange_options();

Expand Down

0 comments on commit ce53f6e

Please sign in to comment.