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

Harness orientation designation fixes #435

Merged
merged 4 commits into from
Feb 17, 2020

Conversation

hivoltag3
Copy link
Contributor

This was causing me mental anguish

// flip CAN0 and CAN2 if we are flipped
  if (car_harness_status == HARNESS_STATUS_NORMAL) {
    can_flip_buses(0, 2);
  }

@robbederks
Copy link
Contributor

Wouldn't it be easier to just flip the two names?
There are also some compile errors due to some mistakes in the changes

@hivoltag3
Copy link
Contributor Author

Essentially this is flipping the names and renaming the relay pins to be more consistent and descriptive. IMO it is more easily readable and understandable this way.

@robbederks
Copy link
Contributor

Thank you for fixing it. I'll clone this into a local branch such that the internal HIL tests can run to ensure functionality, and then it can be merged.

@robbederks robbederks merged commit 769ade0 into commaai:master Feb 17, 2020
theantihero pushed a commit to theantihero/panda that referenced this pull request Mar 12, 2020
* Fix orientation designations in harness.h

* Fix orientation designations in black.h

* Fix orientation designations in uno.h

* Fix typo
@dzid26
Copy link
Contributor

dzid26 commented Feb 5, 2024

Just in case someone goes deep on this. - It took me a while to grasp this line:

// orientation flipped (PANDA_SBU1->HARNESS_SBU1(relay), PANDA_SBU2->HARNESS_SBU2(ign))

I don't know if this was initial intention of this PR, but it actually makes sense because SBU1 connects to SBU2 inside the USB-C cable:
image
1,2.

The other big thing is that RX is routed to TX inside USB-C cable. 3

Thanks

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