66-logging-util Initial Implementation#74
Open
KTruntaev wants to merge 7 commits into
Open
Conversation
| // block in order for anything in the Command-based framework to work. | ||
| CommandScheduler.getInstance().run(); | ||
|
|
||
| // REMEMBER TO MOVE THIS OUT OF ROBOT PERIODIC |
Contributor
There was a problem hiding this comment.
Is this comment outdated or do you still intend to move this out?
| m_logger.updateFields(); | ||
| m_logger.log(); | ||
| } else { | ||
| m_logTime += 20; |
Contributor
There was a problem hiding this comment.
Rather than incrementing this by a fixed 20 here, should we increment by the elapsed time since the last execution?
Comment on lines
+91
to
+93
| public double getMotorSpeed() { | ||
| return m_leftA.get(); | ||
| } |
Contributor
There was a problem hiding this comment.
Maybe this should return both motor speeds (in an array for example). Otherwise we're only ever able to log the speed of one motor. Alternatively you could create a getLeftMotorSpeed and getRightMotorSpeed.
| public void log() { | ||
| try { | ||
| // TODO: Do not close the writer after each write | ||
| FileWriter myWriter = new FileWriter(file,true); |
Contributor
There was a problem hiding this comment.
I think you can accomplish this by simply initializing a private instance variable in your constructor.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added a utility that allows us to record any sensor reading from the robot into a .csv file.
Added changes within RobotContainer.java & Robot.java, and implemented the util folder.
resolves #66