Permalink
Browse files

Initial commit with a completely refactored framework inspired by the…

… 2014 competition codebase.
  • Loading branch information...
rhauch committed May 22, 2015
0 parents commit ee6a56ad773230443fc97813048e2c52e6b761fa
Showing with 11,459 additions and 0 deletions.
  1. +13 −0 .gitignore
  2. +7 −0 COPYRIGHT.txt
  3. +21 −0 LICENSE.txt
  4. +11 −0 README.md
  5. +56 −0 ide-config/strongback-java-cleanup.xml
  6. +291 −0 ide-config/strongback-java-formatter.xml
  7. +16 −0 ide-config/strongback-java-templates.xml
  8. +11 −0 libs/.project
  9. BIN libs/test/fest-assert-1.4-sources.jar
  10. BIN libs/test/fest-assert-1.4.jar
  11. BIN libs/test/fest-util-1.1.6-sources.jar
  12. BIN libs/test/fest-util-1.1.6.jar
  13. BIN libs/test/hamcrest-core-1.3-sources.jar
  14. BIN libs/test/hamcrest-core-1.3.jar
  15. BIN libs/test/junit-4.11-sources.jar
  16. BIN libs/test/junit-4.11.jar
  17. +15 −0 strongback-testing/.classpath
  18. +18 −0 strongback-testing/.project
  19. +51 −0 strongback-testing/src/main/java/org/strongback/command/CommandTester.java
  20. +101 −0 strongback-testing/src/main/java/org/strongback/command/WatchedCommand.java
  21. +213 −0 strongback-testing/src/main/java/org/strongback/mock/Mock.java
  22. +47 −0 strongback-testing/src/main/java/org/strongback/mock/MockAccelerometer.java
  23. +51 −0 strongback-testing/src/main/java/org/strongback/mock/MockAngleSensor.java
  24. +64 −0 strongback-testing/src/main/java/org/strongback/mock/MockClock.java
  25. +50 −0 strongback-testing/src/main/java/org/strongback/mock/MockCompass.java
  26. +47 −0 strongback-testing/src/main/java/org/strongback/mock/MockCurrentSensor.java
  27. +62 −0 strongback-testing/src/main/java/org/strongback/mock/MockDistanceSensor.java
  28. +68 −0 strongback-testing/src/main/java/org/strongback/mock/MockGyroscope.java
  29. +61 −0 strongback-testing/src/main/java/org/strongback/mock/MockMotor.java
  30. +60 −0 strongback-testing/src/main/java/org/strongback/mock/MockRelay.java
  31. +66 −0 strongback-testing/src/main/java/org/strongback/mock/MockSolenoid.java
  32. +67 −0 strongback-testing/src/main/java/org/strongback/mock/MockSwitch.java
  33. +62 −0 strongback-testing/src/main/java/org/strongback/mock/MockTalonSRX.java
  34. +49 −0 strongback-testing/src/main/java/org/strongback/mock/MockTemperatureSensor.java
  35. +39 −0 strongback-testing/src/main/java/org/strongback/mock/MockThreeAxisAccelerometer.java
  36. +44 −0 strongback-testing/src/main/java/org/strongback/mock/MockTwoAxisAccelerometer.java
  37. +48 −0 strongback-testing/src/main/java/org/strongback/mock/MockVoltageSensor.java
  38. +44 −0 strongback-testing/src/main/java/org/strongback/mock/MockZeroable.java
  39. +109 −0 strongback-testing/src/test/java/org/strongback/AccumulatingEventWriter.java
  40. +71 −0 strongback-testing/src/test/java/org/strongback/AsyncEventRecorderTest.java
  41. +457 −0 strongback-testing/src/test/java/org/strongback/command/CommandGroupTest.java
  42. +128 −0 strongback-testing/src/test/java/org/strongback/command/CommandRunnerTest.java
  43. +36 −0 strongback-testing/src/test/java/org/strongback/command/sample/Pause.java
  44. +92 −0 strongback-testing/src/test/java/org/strongback/component/AngleSensorTest.java
  45. +106 −0 strongback-testing/src/test/java/org/strongback/component/CompassTest.java
  46. +80 −0 strongback-testing/src/test/java/org/strongback/component/CounterTest.java
  47. +82 −0 strongback-testing/src/test/java/org/strongback/component/DistanceSensorTest.java
  48. +51 −0 strongback-testing/src/test/java/org/strongback/component/DoubleValueTest.java
  49. +75 −0 strongback-testing/src/test/java/org/strongback/component/FuseTest.java
  50. +127 −0 strongback-testing/src/test/java/org/strongback/component/GyroscopeTest.java
  51. +133 −0 strongback-testing/src/test/java/org/strongback/component/LimitedMotorTest.java
  52. +46 −0 strongback-testing/src/test/java/org/strongback/component/SwitchTest.java
  53. +151 −0 strongback-testing/src/test/java/org/strongback/mock/BasicDoubleMockTest.java
  54. +33 −0 strongback-testing/src/test/java/org/strongback/mock/MockAccelerometerTest.java
  55. +33 −0 strongback-testing/src/test/java/org/strongback/mock/MockAngleSensorTest.java
  56. +62 −0 strongback-testing/src/test/java/org/strongback/mock/MockCompassTest.java
  57. +14 −0 strongback/.classpath
  58. +18 −0 strongback/.project
  59. +173 −0 strongback/src/main/java/org/strongback/AsyncEventRecorder.java
  60. +137 −0 strongback/src/main/java/org/strongback/AsyncSwitchReactor.java
  61. +94 −0 strongback/src/main/java/org/strongback/DataRecorder.java
  62. +37 −0 strongback/src/main/java/org/strongback/DataRecorderChannel.java
  63. +98 −0 strongback/src/main/java/org/strongback/DataRecorderWriter.java
  64. +39 −0 strongback/src/main/java/org/strongback/DataWriter.java
  65. +87 −0 strongback/src/main/java/org/strongback/EventRecorder.java
  66. +33 −0 strongback/src/main/java/org/strongback/Executable.java
  67. +130 −0 strongback/src/main/java/org/strongback/Executor.java
  68. +107 −0 strongback/src/main/java/org/strongback/FileDataWriter.java
  69. +94 −0 strongback/src/main/java/org/strongback/FileEventWriter.java
  70. +92 −0 strongback/src/main/java/org/strongback/Logger.java
  71. +100 −0 strongback/src/main/java/org/strongback/MappedFileDataWriter.java
  72. +61 −0 strongback/src/main/java/org/strongback/NoOpLogger.java
  73. +548 −0 strongback/src/main/java/org/strongback/Strongback.java
  74. +66 −0 strongback/src/main/java/org/strongback/StrongbackRequirementException.java
  75. +73 −0 strongback/src/main/java/org/strongback/SwitchReactor.java
  76. +99 −0 strongback/src/main/java/org/strongback/SystemLogger.java
  77. +33 −0 strongback/src/main/java/org/strongback/annotation/Experimental.java
  78. +46 −0 strongback/src/main/java/org/strongback/annotation/Immutable.java
  79. +42 −0 strongback/src/main/java/org/strongback/annotation/NotThreadSafe.java
  80. +43 −0 strongback/src/main/java/org/strongback/annotation/ThreadSafe.java
  81. +246 −0 strongback/src/main/java/org/strongback/command/Command.java
  82. +185 −0 strongback/src/main/java/org/strongback/command/CommandGroup.java
  83. +252 −0 strongback/src/main/java/org/strongback/command/CommandRunner.java
  84. +54 −0 strongback/src/main/java/org/strongback/command/CommandState.java
  85. +98 −0 strongback/src/main/java/org/strongback/command/Commands.java
  86. +27 −0 strongback/src/main/java/org/strongback/command/Requirable.java
  87. +124 −0 strongback/src/main/java/org/strongback/command/Scheduler.java
  88. +37 −0 strongback/src/main/java/org/strongback/components/Accelerometer.java
  89. +86 −0 strongback/src/main/java/org/strongback/components/AngleSensor.java
  90. +99 −0 strongback/src/main/java/org/strongback/components/Clock.java
  91. +67 −0 strongback/src/main/java/org/strongback/components/Compass.java
  92. +116 −0 strongback/src/main/java/org/strongback/components/Counter.java
  93. +32 −0 strongback/src/main/java/org/strongback/components/CurrentSensor.java
  94. +76 −0 strongback/src/main/java/org/strongback/components/DistanceSensor.java
  95. +111 −0 strongback/src/main/java/org/strongback/components/Fuse.java
  96. +74 −0 strongback/src/main/java/org/strongback/components/Gyroscope.java
  97. +221 −0 strongback/src/main/java/org/strongback/components/LimitedMotor.java
  98. +160 −0 strongback/src/main/java/org/strongback/components/Motor.java
  99. +165 −0 strongback/src/main/java/org/strongback/components/PowerPanel.java
  100. +135 −0 strongback/src/main/java/org/strongback/components/Relay.java
  101. +89 −0 strongback/src/main/java/org/strongback/components/Solenoid.java
  102. +134 −0 strongback/src/main/java/org/strongback/components/SolenoidWithPosition.java
  103. +38 −0 strongback/src/main/java/org/strongback/components/SpeedController.java
  104. +35 −0 strongback/src/main/java/org/strongback/components/SpeedSensor.java
  105. +29 −0 strongback/src/main/java/org/strongback/components/Stoppable.java
  106. +52 −0 strongback/src/main/java/org/strongback/components/Switch.java
  107. +43 −0 strongback/src/main/java/org/strongback/components/TalonSRX.java
  108. +33 −0 strongback/src/main/java/org/strongback/components/TemperatureSensor.java
  109. +133 −0 strongback/src/main/java/org/strongback/components/ThreeAxisAccelerometer.java
  110. +107 −0 strongback/src/main/java/org/strongback/components/TwoAxisAccelerometer.java
  111. +33 −0 strongback/src/main/java/org/strongback/components/VoltageSensor.java
  112. +31 −0 strongback/src/main/java/org/strongback/components/Zeroable.java
  113. +86 −0 strongback/src/main/java/org/strongback/components/package-info.java
  114. +31 −0 strongback/src/main/java/org/strongback/components/ui/AnalogAxis.java
  115. +29 −0 strongback/src/main/java/org/strongback/components/ui/DirectionalAxis.java
  116. +92 −0 strongback/src/main/java/org/strongback/components/ui/FlightStick.java
  117. +164 −0 strongback/src/main/java/org/strongback/components/ui/Gamepad.java
  118. +54 −0 strongback/src/main/java/org/strongback/components/ui/InputDevice.java
  119. +218 −0 strongback/src/main/java/org/strongback/drive/MecanumDrive.java
  120. +350 −0 strongback/src/main/java/org/strongback/drive/TankDrive.java
  121. +40 −0 strongback/src/main/java/org/strongback/function/DoubleToDoubleFunction.java
  122. +40 −0 strongback/src/main/java/org/strongback/function/IntToBooleanFunction.java
  123. +40 −0 strongback/src/main/java/org/strongback/function/IntToIntFunction.java
  124. +633 −0 strongback/src/main/java/org/strongback/hardware/Hardware.java
  125. +81 −0 strongback/src/main/java/org/strongback/hardware/HardwareDoubleSolenoid.java
  126. +57 −0 strongback/src/main/java/org/strongback/hardware/HardwareMotor.java
  127. +60 −0 strongback/src/main/java/org/strongback/hardware/HardwareRelay.java
  128. +104 −0 strongback/src/main/java/org/strongback/hardware/HardwareTalonSRX.java
  129. +70 −0 strongback/src/main/java/org/strongback/util/Collections.java
  130. +118 −0 strongback/src/main/java/org/strongback/util/Metronome.java
  131. +181 −0 strongback/src/main/java/org/strongback/util/Values.java
@@ -0,0 +1,13 @@
# Eclipse top-level resource files are excluded ...
.metadata/
# Some Eclipse project resource files should never be checked in ...
.recommenders/
.settings/
# These are names of directories typically used for generated content, so are ignored ...
build/
deploy/
target/
.DS_Store
@@ -0,0 +1,7 @@
The following have contributed to the Strongback Java codebase.
Randall Hauch <rhauch@gmail.com>
Zach Anderson <zach@speakinwebs.com>
Nathan Brown <nathanbrown735@gmail.com>
Adam Gausmann <adam.gausmann@gmail.com>
Colin Hauch <colin.hauch@gmail.com>
@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2015 Strongback
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
@@ -0,0 +1,11 @@
# Introducing Strongback
Strongback is a simple open source software library that makes your robot code stronger. You can use it along with the WPILib library on your FIRST Robotics Competition robot's RoboRIO. Strongback's design simplifies your robot code, makes it easier for you to test your code without robot hardware, and can record real-time data while you operate your robot for later post-processing.
* *Testable* - Make your robot code much more unit testable. Run the tests on your development machines without requiring any real robot hardware.
* *Hardware abstractions* - Useful abstractions for common actuators and sensors. Easily use different implementations for hardware and for testing.
* *Command framework* - An improved, simplified, and testable command framework. Works automatically with data recorder.
* *Data recorder* - Record in real time the input and output signals from the RoboRIO, button presses, changes in command state, and other information. Process the data in real time (while you drive your robot) or afterward.
* *Use with WPILib* - Built on top of WPILib, so it's familiar.
We're just getting started, so stay tuned.
@@ -0,0 +1,56 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<profiles version="2">
<profile kind="CleanUpProfile" name="Strongback Java Cleanup" version="2">
<setting id="cleanup.remove_unused_private_fields" value="true"/>
<setting id="cleanup.always_use_parentheses_in_expressions" value="false"/>
<setting id="cleanup.never_use_blocks" value="false"/>
<setting id="cleanup.remove_unused_private_methods" value="true"/>
<setting id="cleanup.add_missing_deprecated_annotations" value="true"/>
<setting id="cleanup.convert_to_enhanced_for_loop" value="false"/>
<setting id="cleanup.remove_unnecessary_nls_tags" value="false"/>
<setting id="cleanup.sort_members" value="false"/>
<setting id="cleanup.remove_unused_local_variables" value="false"/>
<setting id="cleanup.never_use_parentheses_in_expressions" value="true"/>
<setting id="cleanup.remove_unused_private_members" value="false"/>
<setting id="cleanup.remove_unnecessary_casts" value="false"/>
<setting id="cleanup.make_parameters_final" value="false"/>
<setting id="cleanup.use_this_for_non_static_field_access" value="false"/>
<setting id="cleanup.remove_private_constructors" value="true"/>
<setting id="cleanup.use_blocks" value="false"/>
<setting id="cleanup.always_use_this_for_non_static_method_access" value="false"/>
<setting id="cleanup.remove_trailing_whitespaces_all" value="true"/>
<setting id="cleanup.always_use_this_for_non_static_field_access" value="false"/>
<setting id="cleanup.use_this_for_non_static_field_access_only_if_necessary" value="true"/>
<setting id="cleanup.add_default_serial_version_id" value="true"/>
<setting id="cleanup.make_type_abstract_if_missing_method" value="false"/>
<setting id="cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class" value="true"/>
<setting id="cleanup.make_variable_declarations_final" value="false"/>
<setting id="cleanup.add_missing_nls_tags" value="false"/>
<setting id="cleanup.format_source_code" value="false"/>
<setting id="cleanup.qualify_static_method_accesses_with_declaring_class" value="false"/>
<setting id="cleanup.add_missing_override_annotations" value="true"/>
<setting id="cleanup.remove_unused_private_types" value="true"/>
<setting id="cleanup.add_missing_methods" value="false"/>
<setting id="cleanup.make_local_variable_final" value="true"/>
<setting id="cleanup.correct_indentation" value="false"/>
<setting id="cleanup.add_missing_override_annotations_interface_methods" value="true"/>
<setting id="cleanup.remove_unused_imports" value="true"/>
<setting id="cleanup.remove_trailing_whitespaces_ignore_empty" value="false"/>
<setting id="cleanup.make_private_fields_final" value="true"/>
<setting id="cleanup.add_generated_serial_version_id" value="false"/>
<setting id="cleanup.organize_imports" value="true"/>
<setting id="cleanup.remove_trailing_whitespaces" value="true"/>
<setting id="cleanup.sort_members_all" value="false"/>
<setting id="cleanup.use_blocks_only_for_return_and_throw" value="false"/>
<setting id="cleanup.add_missing_annotations" value="false"/>
<setting id="cleanup.use_parentheses_in_expressions" value="false"/>
<setting id="cleanup.qualify_static_field_accesses_with_declaring_class" value="false"/>
<setting id="cleanup.use_this_for_non_static_method_access_only_if_necessary" value="true"/>
<setting id="cleanup.use_this_for_non_static_method_access" value="false"/>
<setting id="cleanup.qualify_static_member_accesses_through_instances_with_declaring_class" value="true"/>
<setting id="cleanup.add_serial_version_id" value="false"/>
<setting id="cleanup.format_source_code_changes_only" value="false"/>
<setting id="cleanup.qualify_static_member_accesses_with_declaring_class" value="false"/>
<setting id="cleanup.always_use_blocks" value="true"/>
</profile>
</profiles>
Oops, something went wrong.

0 comments on commit ee6a56a

Please sign in to comment.