Skip to content

Physical e-stop support for MacOS#3800

Open
nycrat wants to merge 2 commits into
masterfrom
avah/macos_physical_estop
Open

Physical e-stop support for MacOS#3800
nycrat wants to merge 2 commits into
masterfrom
avah/macos_physical_estop

Conversation

@nycrat

@nycrat nycrat commented Jun 23, 2026

Copy link
Copy Markdown
Member

Description

This is a stacked PR: #3800 #3802

Instead of relying on hardcoded linux device paths for the physical estop, uses pyserial and checks the vendor id and product id of the arduino used for the estop to locate the path of the estop. This is necessary since the macos serial ports are dynamic.

Testing Done

Ran diagnostics and estop was detected and works like expected.

Resolved Issues

Length Justification and Key Files to Review

Review Checklist

It is the reviewers responsibility to also make sure every item here has been covered

  • Function & Class comments: All function definitions (usually in the .h file) should have a javadoc style comment at the start of them. For examples, see the functions defined in thunderbots/software/geom. Similarly, all classes should have an associated Javadoc comment explaining the purpose of the class.
  • Remove all commented out code
  • Remove extra print statements: for example, those just used for testing
  • Resolve all TODO's: All TODO (or similar) statements should either be completed or associated with a github issue

@nycrat nycrat force-pushed the avah/macos_physical_estop branch from 6ec5245 to 33e343f Compare June 24, 2026 17:45
@nycrat nycrat changed the base branch from avah/macos_plotjuggler_interface to master June 24, 2026 17:45
Comment thread src/shared/constants.h
Comment on lines +219 to +231
struct EstopUsbId
{
const char* vendor_id;
const char* product_id;
};

constexpr EstopUsbId ESTOP_USB_DEVICE_IDS[] = {
{"2341", "0043"}, // Arduino Uno Rev3
{"1a86", "7523"}, // CH340-based Arduino clones
};

constexpr int NUM_ESTOP_USB_DEVICE_IDS =
sizeof(ESTOP_USB_DEVICE_IDS) / sizeof(ESTOP_USB_DEVICE_IDS[0]);

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Note that we can't use std::pair or std::array since this code is required by the estop firmware which doesn't have STL

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