Skip to content

Conversation

@runger1101001
Copy link
Member

Here is the SAMD21 support updated against the dev branch. I tested it on an Nano 33 IoT, and could not see any difference to the version that I'd branched from master.

I had to make one change to the new Commander class: it was using "HardwareSerial", but SAMD21 "standard serial" is via the USB port, and uses "USBSerial". So I changed Commander to user "Stream", which is the common subclass of both of these. The code itself was not using any methods that aren't in Stream anyway.

This looks better now, and could be merged without conflicts.

The only changes to existing code are the mentioned Commander class changes, and adding the SAMD21 define in generic_mcu.cpp.

@askuric
Copy link
Member

askuric commented Mar 4, 2021

Richard that is perfect!

I have a question before I merge it. Are you sure that Stream is the same as HadrwareSerial?
I was using Print before, but in Commander I really need to use Serial.available() and so on...

I suppose we can create different types of handlers for different communications.
But for now, I might leave it as HardwareSerial, just for the sake of finishing this huge release :D

@askuric askuric merged commit 5fef0a1 into simplefoc:dev Mar 4, 2021
@runger1101001
Copy link
Member Author

Awesome! I will do some tests on the merged code and report back.

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.

2 participants