Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support FW Flash scheme 106 #6429

Merged
merged 2 commits into from
May 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion common/notifications.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ namespace rs2
}
}

const int notification_model::get_max_lifetime_ms() const
int notification_model::get_max_lifetime_ms() const
{
return 10000;
}
Expand Down
8 changes: 5 additions & 3 deletions common/notifications.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ namespace rs2
void draw_text(const char* msg, int x, int y, int h);
virtual void set_color_scheme(float t) const;
void unset_color_scheme() const;
virtual const int get_max_lifetime_ms() const;
virtual int get_max_lifetime_ms() const;

virtual int calc_height();
virtual void draw_pre_effect(int x, int y) {}
Expand Down Expand Up @@ -100,6 +100,8 @@ namespace rs2
process_manager(std::string name)
: _process_name(name) {}

virtual ~process_manager() = default;

void start(std::shared_ptr<notification_model> n);
int get_progress() const { return _progress; }
bool done() const { return _done; }
Expand Down Expand Up @@ -154,7 +156,7 @@ namespace rs2
void set_color_scheme(float t) const override;
void draw_content(ux_window& win, int x, int y, float t, std::string& error_message) override;
int calc_height() override;
const int get_max_lifetime_ms() const override { return 40000; }
int get_max_lifetime_ms() const override { return 40000; }

int _version;
bool _first = true;
Expand All @@ -167,7 +169,7 @@ namespace rs2
void set_color_scheme(float t) const override;
void draw_content(ux_window& win, int x, int y, float t, std::string& error_message) override;
int calc_height() override { return 130; }
const int get_max_lifetime_ms() const override { return 40000; }
int get_max_lifetime_ms() const override { return 40000; }
};


Expand Down
2 changes: 2 additions & 0 deletions src/ds5/ds5-device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ namespace librealsense
std::vector<uint8_t> flash;
flash.reserve(flash_size);

LOG_DEBUG("Flash backup started...");
uvc_sensor& raw_depth_sensor = get_raw_depth_sensor();
raw_depth_sensor.invoke_powered([&](platform::uvc_device& dev)
{
Expand All @@ -164,6 +165,7 @@ namespace librealsense

flash.insert(flash.end(), res.begin(), res.end());
appended = true;
LOG_DEBUG("Flash backup - " << flash.size() << "/" << flash_size << " bytes downloaded");
}
catch (...)
{
Expand Down
1 change: 0 additions & 1 deletion src/ds5/ds5-motion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,6 @@ namespace librealsense
hid_ep->register_option(RS2_OPTION_GLOBAL_TIME_ENABLED, enable_global_time_option);

// register pre-processing
bool enable_imu_correction = false;
std::shared_ptr<enable_motion_correction> mm_correct_opt = nullptr;

// Motion intrinsic calibration presents is a prerequisite for motion correction.
Expand Down
6 changes: 4 additions & 2 deletions src/ds5/ds5-private.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace librealsense
{
for (auto& elem : resolutions_list)
{
if (elem.second.x == width && elem.second.y == height)
if (uint32_t(elem.second.x) == width && uint32_t(elem.second.y) == height)
return elem.first;
}
return max_ds5_rect_resolutions;
Expand Down Expand Up @@ -342,7 +342,9 @@ namespace librealsense
case 102: return { 3, { 9, 10, 16, 40, 29, 18, 19, 30, 20, 21, 54 } };
case 103: return { 4, { 9, 10, 16, 40, 29, 18, 19, 30, 20, 21, 54 } };
case 104: return { 4, { 9, 10, 40, 29, 18, 19, 30, 20, 21, 54 } };
case 105: return { 5, { 9, 10, 40, 29, 18, 19, 30, 20, 21, 54 } };
case 105: // fall through
case 106:
return { 5, { 9, 10, 40, 29, 18, 19, 30, 20, 21, 54 } };
default:
throw std::runtime_error("Unsupported flash version: " + std::to_string(flash_version));
}
Expand Down
2 changes: 1 addition & 1 deletion src/ds5/ds5-private.h
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,7 @@ namespace librealsense
data_present.emplace(imu_calibration_id, false);
data_present.emplace(lens_shading_id, false);
data_present.emplace(projector_id, false);
};
}
};

static std::map< ds5_rect_resolutions, int2> resolutions_list = {
Expand Down