-
Notifications
You must be signed in to change notification settings - Fork 618
Mock platform #949
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
Mock platform #949
Conversation
Signed-off-by: Adelin Dobre <adelin.dobre@rinftech.com>
...e I/O Signed-off-by: Adelin Dobre <adelin.dobre@rinftech.com>
Signed-off-by: Adelin Dobre <adelin.dobre@rinftech.com>
...platform Signed-off-by: Adelin Dobre <adelin.dobre@rinftech.com>
Signed-off-by: Adelin Dobre <adelin.dobre@rinftech.com>
...tests Signed-off-by: Adelin Dobre <adelin.dobre@rinftech.com>
@alext-mkrs
alext-mkrs
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The concept looks ok in general, but please see/address those specific line comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's make this a base for MRAA_MOCK_PINCOUNT to avoid repeating the same piece two times.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: shis and line below need one more space to align on opening (
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: as we don't expect this do be a negative please use uint or somesuch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a space after for and before ( to align with mraa code style. Better yet - please run clang-format on your submissions with the confir file from the repo root.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a space after if and before ( to align with mraa code style. Better yet - please run clang-format on your submissions with the confir file from the repo root.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While not strictly necessary, I'd suggest to put this/same check into the write_duty_replace as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be honest, I don't like changing base files for specific platforms, that's what replace functions are for. Why can't this be done there or why can't you pass the shifted value right away?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Why this change?
- If this is really necessary, you have to update the mock platform description in
docsas well. - If this is really necessary, the respective test updates must be in the same commit, so that
masteris never broken.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update the mock platform description in docs accordingly, right now the PWM functionality and the extra pin are not mentioned.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please combine all those test changes into the same commit that introduces the PWM pin - so that the pin addition goes in as an atomic change and we have both functionality and tests for it right away.
No description provided.