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

AP_ToshibaCAN: add support for Toshiba CAN ESC #10249

Merged
merged 5 commits into from
Jan 18, 2019
Merged

Conversation

rmackay9
Copy link
Contributor

@rmackay9 rmackay9 commented Jan 15, 2019

This PR adds support for the Toshiba CAN ESCs and includes some changes from @OXINARF's KDECAN PR.

Manufacturer product page is here (including video) and here (Japanese only sorry)

This driver has been both bench tested and flight tested on a real vehicle. There are some known potential issues:

  • We send 4 commands (unlock, motor bank1, 2 and 3) every iteration (i.e. 400hz on copter) which is perhaps a touch wasteful although each command is quite small (6 or 8 bytes) so maybe it doesn't matter
  • We should probably send motor bank1 after 2 and 3 because apparently all ESCs adjust their time when the motorbank1 message arrives (whether they're in motorbank1 or not).
  • If we are unable to send a motorbank we don't try sending any later banks which opens up the possibility of later banks being starved. Perhaps we should just keep trying to send the motor bank forever?
  • There's no feedback from the ESCs (yet) but I hope to add this in a future PR.

Below are some relevant bits of the datasheet. The ESCs don't have a "discovery" feature. Instead the user toggles some dip switches to tell each ESC what it's number is.
toshibaesc-manual1

toshibaesc-manual2

@rmackay9 rmackay9 added the CAN label Jan 15, 2019
tridge
tridge previously requested changes Jan 17, 2019
Copy link
Contributor

@tridge tridge left a comment

Choose a reason for hiding this comment

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

should this go in before or after KDE CAN ?

libraries/AP_ToshibaCAN/AP_ToshibaCAN.cpp Outdated Show resolved Hide resolved
libraries/AP_ToshibaCAN/AP_ToshibaCAN.cpp Outdated Show resolved Hide resolved
libraries/AP_ToshibaCAN/AP_ToshibaCAN.cpp Outdated Show resolved Hide resolved
libraries/AP_ToshibaCAN/AP_ToshibaCAN.cpp Outdated Show resolved Hide resolved
@rmackay9 rmackay9 added the WIP label Jan 17, 2019
@rmackay9 rmackay9 dismissed tridge’s stale review January 17, 2019 11:31

Txs for the help on this PR. I think I've addressed the issues found.

@rmackay9
Copy link
Contributor Author

rebased and squashed. We will do one final flight test tomorrow that everything is still working OK.

@rmackay9
Copy link
Contributor Author

This is rebased on master (which includes the KDECAN changes) and has also been tested on a real vehicle and confirmed to work so I'll merge shortly...

Copy link
Contributor

@tridge tridge left a comment

Choose a reason for hiding this comment

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

looks good!

@tridge tridge merged commit 06bb02f into ArduPilot:master Jan 18, 2019
@rmackay9 rmackay9 deleted the tcan3 branch January 20, 2019 23:53
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants