★ wanayoo — archive 1999 https://github.com/ev3dev-lang-java/ev3dev-lang-java/pull/540Nouvelle recherche | Portail wanayoo
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

Code fixes for Feature/#498 #540

Merged
merged 14 commits into from Oct 30, 2018
Merged

Code fixes for Feature/#498 #540

merged 14 commits into from Oct 30, 2018

Conversation

@JakubVanek
Copy link
Contributor

@JakubVanek JakubVanek commented Oct 29, 2018

This resolves all my objections I've had.

JakubVanek added 7 commits Oct 29, 2018
- removed VALUEn constants
- cleaned up code a little bit
- removed integer-based switchMode
- made string-based switchMode public
- removed saving of current sensor mode - we read always from the kernel now
- reading now depends on BaseSensor
- switchMode is called on sensor before reading data
- merged all sensor cases into one reading loop
- sensor mode 3 doesn't not exist, but 2 does
JakubVanek added 4 commits Oct 29, 2018
@JakubVanek JakubVanek requested a review from jabrena Oct 29, 2018
@JakubVanek JakubVanek added this to the v0.9.0 milestone Oct 29, 2018
@JakubVanek
Copy link
Contributor Author

@JakubVanek JakubVanek commented Oct 29, 2018

Hmmm, BaseSensor#setCurrentMode()/getCurrentMode()/fetchSample() are now independent from the system sensor mode.

@jabrena
Copy link
Member

@jabrena jabrena commented Oct 29, 2018

Tomorrow, I will check and I will merge in the branch

@jabrena
Copy link
Member

@jabrena jabrena commented Oct 30, 2018

I have reviewed the changes in Github. I liked the refactoring in both sides: Classes & Tests.

Maybe we mixed the refactoring in the tests with the changes in the objects for sensors.
It is better to do one change per time, if we change sensor class, don't change tests. It is important for the future to reduce the complexity of the analysis.

Later, I will download the branch to review the changes in the sensor classes.

Juan Antonio

@JakubVanek
Copy link
Contributor Author

@JakubVanek JakubVanek commented Oct 30, 2018

Oki, thanks for the review.
Yup, looking back the fake sensor refactoring is independent from the work done on sensors. I'm thinking about doing the same thing to the motor classes, but that has even less to do with sensor classes.

@jabrena
Copy link
Member

@jabrena jabrena commented Oct 30, 2018

For the motor in another moment, put the focus in the issue. Later we will refactor :)

@jabrena jabrena merged commit 2f011a6 into feature/#498 Oct 30, 2018
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
@jabrena jabrena deleted the feature/#498_review branch Oct 31, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.