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

feat: Implement a method to change the device id #5

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

DeboraTahara
Copy link

@DeboraTahara DeboraTahara commented Dec 12, 2024

What is this PR for

[sc-65148]

How I did it

Results, How I tested

Checklist

  • Assign yourself in the PR
  • Write unit tests (when relevant)
  • Run rubocop and rake tests locally
  • If this PR initialize a CMAKE package please enable styling and linting
  • Analyse if this PR modifies the UI, if so:
    • Tested Tupan's simulation (Charts) 🗺️
    • Tested Tupan's simulation (Hud) 🕹️
    • Tested ROV's simulation 🕹️

@DeboraTahara DeboraTahara self-assigned this Dec 12, 2024
@@ -96,6 +96,18 @@ int main(int argc, char** argv)
}
std::cout << wp_device.getConfig() << std::endl;
}
else if (cmd == "set_id") {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also update the usage message at the top of the file please (add the dc-cube command as well)

waitResult(*can_device, device, device.querySerialNumber());
uint32_t serial_number = device.getSerialNumber();
int device_new_id(std::stoi(argv[6]));
waitResult(*can_device, device, device.querySetId(device_new_id, serial_number));

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we verified in live that we should send the set id query to can id 0x600 (broadcast)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants