From 62812faf62e3dcced78d4a1dfe44c4d8823b4a34 Mon Sep 17 00:00:00 2001 From: Tyler Veness Date: Wed, 25 May 2016 22:40:15 -0700 Subject: [PATCH] Clean up include guards and EOF newlines (#65) * Replaced include guards with #pragma once * All source files now have exactly one newline appended Some files had either two newlines at the end or none (which isn't POSIX compliant). This patch fixes that. --- .clang-format | 1 - .gitreview | 2 +- CONTRIBUTING.md | 2 +- README.md | 2 +- hal/include/HAL/Compressor.h | 5 +---- simulation/JavaGazebo/build.gradle | 2 +- styleguide/styleguide.css | 1 - styleguide/styleguide.xsl | 1 - test-scripts/.gitattributes | 2 +- test-scripts/README.html | 2 +- test-scripts/config.sh | 3 --- wpilibc/athena/include/Compressor.h | 5 +---- wpilibc/athena/include/ControllerPower.h | 4 +--- wpilibc/athena/include/Joystick.h | 5 +---- wpilibc/athena/include/PowerDistributionPanel.h | 4 ---- wpilibc/build.gradle | 1 - wpilibc/shared/include/Buttons/Button.h | 5 +---- .../shared/include/Buttons/ButtonScheduler.h | 5 +---- .../include/Buttons/CancelButtonScheduler.h | 5 +---- .../include/Buttons/HeldButtonScheduler.h | 5 +---- wpilibc/shared/include/Buttons/InternalButton.h | 5 +---- wpilibc/shared/include/Buttons/JoystickButton.h | 5 +---- wpilibc/shared/include/Buttons/NetworkButton.h | 5 +---- .../include/Buttons/PressedButtonScheduler.h | 5 +---- .../include/Buttons/ReleasedButtonScheduler.h | 5 +---- .../include/Buttons/ToggleButtonScheduler.h | 5 +---- wpilibc/shared/include/Buttons/Trigger.h | 5 +---- wpilibc/shared/include/Commands/Command.h | 5 +---- wpilibc/shared/include/Commands/CommandGroup.h | 5 +---- .../shared/include/Commands/CommandGroupEntry.h | 5 +---- wpilibc/shared/include/Commands/PIDCommand.h | 5 +---- wpilibc/shared/include/Commands/PIDSubsystem.h | 5 +---- wpilibc/shared/include/Commands/PrintCommand.h | 5 +---- wpilibc/shared/include/Commands/Scheduler.h | 4 +--- wpilibc/shared/include/Commands/StartCommand.h | 5 +---- wpilibc/shared/include/Commands/Subsystem.h | 5 +---- wpilibc/shared/include/Commands/WaitCommand.h | 5 +---- .../shared/include/Commands/WaitForChildren.h | 5 +---- .../shared/include/Commands/WaitUntilCommand.h | 5 +---- wpilibc/shared/include/LiveWindow/LiveWindow.h | 5 +---- .../include/LiveWindow/LiveWindowSendable.h | 5 +---- .../LiveWindow/LiveWindowStatusListener.h | 5 +---- .../include/SmartDashboard/NamedSendable.h | 17 +++++++---------- .../shared/include/SmartDashboard/Sendable.h | 5 +---- .../include/SmartDashboard/SendableChooser.h | 5 +---- .../include/SmartDashboard/SmartDashboard.h | 5 +---- .../shared/include/interfaces/Potentiometer.h | 5 +---- wpilibc/sim/include/Joystick.h | 5 +---- wpilibc/sim/include/simulation/MainNode.h | 5 +---- .../include/simulation/SimContinuousOutput.h | 5 +---- .../sim/include/simulation/SimDigitalInput.h | 5 +---- wpilibc/sim/include/simulation/SimEncoder.h | 5 +---- wpilibc/sim/include/simulation/SimFloatInput.h | 5 +---- wpilibc/sim/include/simulation/SimGyro.h | 5 +---- wpilibj/src/athena/cpp/.gitignore | 2 +- .../runintegrationjavaprogram | 2 +- .../src/main/resources/logging.properties | 3 --- 57 files changed, 56 insertions(+), 194 deletions(-) diff --git a/.clang-format b/.clang-format index d332ee08ca..0492da8fe8 100644 --- a/.clang-format +++ b/.clang-format @@ -87,4 +87,3 @@ Standard: Auto TabWidth: 8 UseTab: Never ... - diff --git a/.gitreview b/.gitreview index f115ac15aa..aa0fc892e7 100644 --- a/.gitreview +++ b/.gitreview @@ -2,4 +2,4 @@ host=usfirst.collab.net port=29418 project=allwpilib -defaultbranch=master \ No newline at end of file +defaultbranch=master diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0d946875ee..9659ebe887 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -53,4 +53,4 @@ When you first submit changes, Travis-CI will attempt to run `./gradlew check` o ## Licensing -By contributing to WPILib, you agree that your code will be distributed with WPILib, and licensed under the license for the WPILib project. You should not contribute code that you do not have permission to relicense in this manner. This includes code that is licensed under the GPL that you do not have permission to relicense, as WPILib is not released under a copyleft license. Our license is the 3-clause BSD license, which you can find [here](license.txt). \ No newline at end of file +By contributing to WPILib, you agree that your code will be distributed with WPILib, and licensed under the license for the WPILib project. You should not contribute code that you do not have permission to relicense in this manner. This includes code that is licensed under the GPL that you do not have permission to relicense, as WPILib is not released under a copyleft license. Our license is the 3-clause BSD license, which you can find [here](license.txt). diff --git a/README.md b/README.md index 50985a8c95..2edc0afed2 100644 --- a/README.md +++ b/README.md @@ -89,4 +89,4 @@ The styleguide directory contains the styleguide for C++ and Java code. Anything # Contributing to WPILib -See [CONTRIBUTING.md](CONTRIBUTING.md). \ No newline at end of file +See [CONTRIBUTING.md](CONTRIBUTING.md). diff --git a/hal/include/HAL/Compressor.h b/hal/include/HAL/Compressor.h index cfea35c034..2f8f53cdc1 100644 --- a/hal/include/HAL/Compressor.h +++ b/hal/include/HAL/Compressor.h @@ -7,8 +7,7 @@ #include -#ifndef __HAL_COMPRESSOR_H__ -#define __HAL_COMPRESSOR_H__ +#pragma once extern "C" { void* initializeCompressor(uint8_t module); @@ -30,5 +29,3 @@ bool getCompressorNotConnectedStickyFault(void* pcm_pointer, int32_t* status); bool getCompressorNotConnectedFault(void* pcm_pointer, int32_t* status); void clearAllPCMStickyFaults(void* pcm_pointer, int32_t* status); } - -#endif diff --git a/simulation/JavaGazebo/build.gradle b/simulation/JavaGazebo/build.gradle index 4a0456a84c..9b77dc0365 100644 --- a/simulation/JavaGazebo/build.gradle +++ b/simulation/JavaGazebo/build.gradle @@ -15,4 +15,4 @@ publishing { dependencies { compile 'com.google.protobuf:protobuf-java:2.5.0' -} \ No newline at end of file +} diff --git a/styleguide/styleguide.css b/styleguide/styleguide.css index adba8f3cc8..f5d7a63c48 100644 --- a/styleguide/styleguide.css +++ b/styleguide/styleguide.css @@ -144,4 +144,3 @@ hr { .revision { text-align: right; } - diff --git a/styleguide/styleguide.xsl b/styleguide/styleguide.xsl index 09a9b95586..0c656bd350 100644 --- a/styleguide/styleguide.xsl +++ b/styleguide/styleguide.xsl @@ -921,4 +921,3 @@ xmlns:fn="http://www.w3.org/2005/xpath-functions"> - diff --git a/test-scripts/.gitattributes b/test-scripts/.gitattributes index 81224b1aaa..cb5c1522d9 100644 --- a/test-scripts/.gitattributes +++ b/test-scripts/.gitattributes @@ -1,4 +1,4 @@ # Set the default behavior, in case people don't have core.autocrlf set. * text=auto -*.sh text eol=lf \ No newline at end of file +*.sh text eol=lf diff --git a/test-scripts/README.html b/test-scripts/README.html index a8d91d40cf..ee34d4f579 100644 --- a/test-scripts/README.html +++ b/test-scripts/README.html @@ -378,4 +378,4 @@ td:not(.linenos) .linenodiv { padding: 0 !important; }

These test scripts are designed to allow the user of the WPILib test framework to quickly and easily deploy and run their tests on the WPI roboRIO.

In order for the automated test system to work there is a driver station onboard the roboRIO that handles a queue of users waiting to use the driver station. All of the interaction with this queue is handled internally by test scripts contained within this file.

Running Tests

-

See screen steps live: [TODO: Add link to screen steps live]

\ No newline at end of file +

See screen steps live: [TODO: Add link to screen steps live]

diff --git a/test-scripts/config.sh b/test-scripts/config.sh index e9fc7f4699..181d2ffcf4 100644 --- a/test-scripts/config.sh +++ b/test-scripts/config.sh @@ -36,6 +36,3 @@ DEFAULT_LOCAL_JAVA_TEST_FILE=../wpilibjIntegrationTests/build/libs/wpilibjIntegr JAVA_REPORT=javareport.xml DEFAULT_LOCAL_JAVA_TEST_RESULT=${DEFAULT_LOCAL_TEST_RESULTS_DIR}/${JAVA_REPORT} DEFAULT_DESTINATION_JAVA_TEST_RESULTS=${DEFAULT_DESTINATION_TEST_RESULTS_DIR}/AntReports/TEST-edu.wpi.first.wpilibj.test.TestSuite.xml - - - diff --git a/wpilibc/athena/include/Compressor.h b/wpilibc/athena/include/Compressor.h index 2c9527501e..2960058212 100644 --- a/wpilibc/athena/include/Compressor.h +++ b/wpilibc/athena/include/Compressor.h @@ -5,8 +5,7 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -#ifndef Compressor_H_ -#define Compressor_H_ +#pragma once #include @@ -61,5 +60,3 @@ class Compressor : public SensorBase, std::shared_ptr m_table; }; - -#endif /* Compressor_H_ */ diff --git a/wpilibc/athena/include/ControllerPower.h b/wpilibc/athena/include/ControllerPower.h index 18367b5ace..a070d3cc9f 100644 --- a/wpilibc/athena/include/ControllerPower.h +++ b/wpilibc/athena/include/ControllerPower.h @@ -5,8 +5,7 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -#ifndef __CONTROLLER_POWER_H__ -#define __CONTROLLER_POWER_H__ +#pragma once class ControllerPower { public: @@ -25,4 +24,3 @@ class ControllerPower { static bool GetEnabled6V(); static int GetFaultCount6V(); }; -#endif \ No newline at end of file diff --git a/wpilibc/athena/include/Joystick.h b/wpilibc/athena/include/Joystick.h index b40e37ed20..60b864a95a 100644 --- a/wpilibc/athena/include/Joystick.h +++ b/wpilibc/athena/include/Joystick.h @@ -5,8 +5,7 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -#ifndef JOYSTICK_H_ -#define JOYSTICK_H_ +#pragma once #include @@ -115,5 +114,3 @@ class Joystick : public GenericHID, public ErrorBase { uint16_t m_leftRumble = 0; uint16_t m_rightRumble = 0; }; - -#endif diff --git a/wpilibc/athena/include/PowerDistributionPanel.h b/wpilibc/athena/include/PowerDistributionPanel.h index 702eb9f98d..6fd86bd12e 100644 --- a/wpilibc/athena/include/PowerDistributionPanel.h +++ b/wpilibc/athena/include/PowerDistributionPanel.h @@ -6,8 +6,6 @@ /*----------------------------------------------------------------------------*/ #pragma once -#ifndef __WPILIB_POWER_DISTRIBUTION_PANEL_H__ -#define __WPILIB_POWER_DISTRIBUTION_PANEL_H__ #include @@ -44,5 +42,3 @@ class PowerDistributionPanel : public SensorBase, public LiveWindowSendable { std::shared_ptr m_table; uint8_t m_module; }; - -#endif /* __WPILIB_POWER_DISTRIBUTION_PANEL_H__ */ diff --git a/wpilibc/build.gradle b/wpilibc/build.gradle index a1f445ccbe..fd29972fb6 100644 --- a/wpilibc/build.gradle +++ b/wpilibc/build.gradle @@ -26,4 +26,3 @@ apply from: 'athena.gradle' if (hasProperty('makeSim')){ apply from: 'simulation.gradle' } - diff --git a/wpilibc/shared/include/Buttons/Button.h b/wpilibc/shared/include/Buttons/Button.h index 995c67a048..273d9e4276 100644 --- a/wpilibc/shared/include/Buttons/Button.h +++ b/wpilibc/shared/include/Buttons/Button.h @@ -5,8 +5,7 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -#ifndef __BUTTON_H__ -#define __BUTTON_H__ +#pragma once #include "Buttons/Trigger.h" #include "Commands/Command.h" @@ -33,5 +32,3 @@ class Button : public Trigger { virtual void CancelWhenPressed(Command* command); virtual void ToggleWhenPressed(Command* command); }; - -#endif diff --git a/wpilibc/shared/include/Buttons/ButtonScheduler.h b/wpilibc/shared/include/Buttons/ButtonScheduler.h index 6e95a303e8..f72af8fa97 100644 --- a/wpilibc/shared/include/Buttons/ButtonScheduler.h +++ b/wpilibc/shared/include/Buttons/ButtonScheduler.h @@ -5,8 +5,7 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -#ifndef __BUTTON_SCHEDULER_H__ -#define __BUTTON_SCHEDULER_H__ +#pragma once class Trigger; class Command; @@ -23,5 +22,3 @@ class ButtonScheduler { Trigger* m_button; Command* m_command; }; - -#endif diff --git a/wpilibc/shared/include/Buttons/CancelButtonScheduler.h b/wpilibc/shared/include/Buttons/CancelButtonScheduler.h index 17517e8568..4f570cf3da 100644 --- a/wpilibc/shared/include/Buttons/CancelButtonScheduler.h +++ b/wpilibc/shared/include/Buttons/CancelButtonScheduler.h @@ -5,8 +5,7 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -#ifndef __CANCEL_BUTTON_SCHEDULER_H__ -#define __CANCEL_BUTTON_SCHEDULER_H__ +#pragma once #include "Buttons/ButtonScheduler.h" @@ -22,5 +21,3 @@ class CancelButtonScheduler : public ButtonScheduler { private: bool pressedLast; }; - -#endif diff --git a/wpilibc/shared/include/Buttons/HeldButtonScheduler.h b/wpilibc/shared/include/Buttons/HeldButtonScheduler.h index db90dab5cd..570faf1e49 100644 --- a/wpilibc/shared/include/Buttons/HeldButtonScheduler.h +++ b/wpilibc/shared/include/Buttons/HeldButtonScheduler.h @@ -5,8 +5,7 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -#ifndef __HELD_BUTTON_SCHEDULER_H__ -#define __HELD_BUTTON_SCHEDULER_H__ +#pragma once #include "Buttons/ButtonScheduler.h" @@ -19,5 +18,3 @@ class HeldButtonScheduler : public ButtonScheduler { virtual ~HeldButtonScheduler() = default; virtual void Execute(); }; - -#endif diff --git a/wpilibc/shared/include/Buttons/InternalButton.h b/wpilibc/shared/include/Buttons/InternalButton.h index 6beea7b2d8..fc804c9006 100644 --- a/wpilibc/shared/include/Buttons/InternalButton.h +++ b/wpilibc/shared/include/Buttons/InternalButton.h @@ -5,8 +5,7 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -#ifndef __INTERNAL_BUTTON_H__ -#define __INTERNAL_BUTTON_H__ +#pragma once #include "Buttons/Button.h" @@ -25,5 +24,3 @@ class InternalButton : public Button { bool m_pressed = false; bool m_inverted = false; }; - -#endif diff --git a/wpilibc/shared/include/Buttons/JoystickButton.h b/wpilibc/shared/include/Buttons/JoystickButton.h index 7b9e8c0408..0dc9c5c0c9 100644 --- a/wpilibc/shared/include/Buttons/JoystickButton.h +++ b/wpilibc/shared/include/Buttons/JoystickButton.h @@ -5,8 +5,7 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -#ifndef __JOYSTICK_BUTTON_H__ -#define __JOYSTICK_BUTTON_H__ +#pragma once #include "Buttons/Button.h" #include "GenericHID.h" @@ -22,5 +21,3 @@ class JoystickButton : public Button { GenericHID* m_joystick; int m_buttonNumber; }; - -#endif diff --git a/wpilibc/shared/include/Buttons/NetworkButton.h b/wpilibc/shared/include/Buttons/NetworkButton.h index 1ea56a5d01..e72ae6e4dc 100644 --- a/wpilibc/shared/include/Buttons/NetworkButton.h +++ b/wpilibc/shared/include/Buttons/NetworkButton.h @@ -5,8 +5,7 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -#ifndef __NETWORK_BUTTON_H__ -#define __NETWORK_BUTTON_H__ +#pragma once #include #include @@ -24,5 +23,3 @@ class NetworkButton : public Button { std::shared_ptr m_netTable; std::string m_field; }; - -#endif diff --git a/wpilibc/shared/include/Buttons/PressedButtonScheduler.h b/wpilibc/shared/include/Buttons/PressedButtonScheduler.h index 468e3ba2ba..70e870a216 100644 --- a/wpilibc/shared/include/Buttons/PressedButtonScheduler.h +++ b/wpilibc/shared/include/Buttons/PressedButtonScheduler.h @@ -5,8 +5,7 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -#ifndef __PRESSED_BUTTON_SCHEDULER_H__ -#define __PRESSED_BUTTON_SCHEDULER_H__ +#pragma once #include "Buttons/ButtonScheduler.h" @@ -19,5 +18,3 @@ class PressedButtonScheduler : public ButtonScheduler { virtual ~PressedButtonScheduler() = default; virtual void Execute(); }; - -#endif diff --git a/wpilibc/shared/include/Buttons/ReleasedButtonScheduler.h b/wpilibc/shared/include/Buttons/ReleasedButtonScheduler.h index 3e17a7df50..53365c2668 100644 --- a/wpilibc/shared/include/Buttons/ReleasedButtonScheduler.h +++ b/wpilibc/shared/include/Buttons/ReleasedButtonScheduler.h @@ -5,8 +5,7 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -#ifndef __RELEASED_BUTTON_SCHEDULER_H__ -#define __RELEASED_BUTTON_SCHEDULER_H__ +#pragma once #include "Buttons/ButtonScheduler.h" @@ -19,5 +18,3 @@ class ReleasedButtonScheduler : public ButtonScheduler { virtual ~ReleasedButtonScheduler() = default; virtual void Execute(); }; - -#endif diff --git a/wpilibc/shared/include/Buttons/ToggleButtonScheduler.h b/wpilibc/shared/include/Buttons/ToggleButtonScheduler.h index 19d4207b4f..cda5e1bc33 100644 --- a/wpilibc/shared/include/Buttons/ToggleButtonScheduler.h +++ b/wpilibc/shared/include/Buttons/ToggleButtonScheduler.h @@ -5,8 +5,7 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -#ifndef __TOGGLE_BUTTON_SCHEDULER_H__ -#define __TOGGLE_BUTTON_SCHEDULER_H__ +#pragma once #include "Buttons/ButtonScheduler.h" @@ -22,5 +21,3 @@ class ToggleButtonScheduler : public ButtonScheduler { private: bool pressedLast; }; - -#endif diff --git a/wpilibc/shared/include/Buttons/Trigger.h b/wpilibc/shared/include/Buttons/Trigger.h index 34c739a9b7..db2395f12a 100644 --- a/wpilibc/shared/include/Buttons/Trigger.h +++ b/wpilibc/shared/include/Buttons/Trigger.h @@ -5,8 +5,7 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -#ifndef __TRIGGER_H__ -#define __TRIGGER_H__ +#pragma once #include #include "SmartDashboard/Sendable.h" @@ -49,5 +48,3 @@ class Trigger : public Sendable { protected: std::shared_ptr m_table; }; - -#endif diff --git a/wpilibc/shared/include/Commands/Command.h b/wpilibc/shared/include/Commands/Command.h index 64b78bfade..2727829df8 100644 --- a/wpilibc/shared/include/Commands/Command.h +++ b/wpilibc/shared/include/Commands/Command.h @@ -5,8 +5,7 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -#ifndef __COMMAND_H__ -#define __COMMAND_H__ +#pragma once #include #include @@ -178,5 +177,3 @@ class Command : public ErrorBase, public NamedSendable, public ITableListener { protected: std::shared_ptr m_table; }; - -#endif diff --git a/wpilibc/shared/include/Commands/CommandGroup.h b/wpilibc/shared/include/Commands/CommandGroup.h index 1f7454bcde..1cb74fddcf 100644 --- a/wpilibc/shared/include/Commands/CommandGroup.h +++ b/wpilibc/shared/include/Commands/CommandGroup.h @@ -5,8 +5,7 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -#ifndef __COMMAND_GROUP_H__ -#define __COMMAND_GROUP_H__ +#pragma once #include #include @@ -69,5 +68,3 @@ class CommandGroup : public Command { /** The current command, -1 signifies that none have been run */ int m_currentCommandIndex = -1; }; - -#endif diff --git a/wpilibc/shared/include/Commands/CommandGroupEntry.h b/wpilibc/shared/include/Commands/CommandGroupEntry.h index 17fff6da2a..0a9cb18703 100644 --- a/wpilibc/shared/include/Commands/CommandGroupEntry.h +++ b/wpilibc/shared/include/Commands/CommandGroupEntry.h @@ -5,8 +5,7 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -#ifndef __COMMAND_GROUP_ENTRY_H__ -#define __COMMAND_GROUP_ENTRY_H__ +#pragma once class Command; @@ -26,5 +25,3 @@ class CommandGroupEntry { Command* m_command = nullptr; Sequence m_state = kSequence_InSequence; }; - -#endif diff --git a/wpilibc/shared/include/Commands/PIDCommand.h b/wpilibc/shared/include/Commands/PIDCommand.h index eac95baa34..496513fa9f 100644 --- a/wpilibc/shared/include/Commands/PIDCommand.h +++ b/wpilibc/shared/include/Commands/PIDCommand.h @@ -5,8 +5,7 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -#ifndef __PID_COMMAND_H__ -#define __PID_COMMAND_H__ +#pragma once #include "Commands/Command.h" #include "PIDController.h" @@ -55,5 +54,3 @@ class PIDCommand : public Command, public PIDOutput, public PIDSource { virtual void InitTable(std::shared_ptr table); virtual std::string GetSmartDashboardType() const; }; - -#endif diff --git a/wpilibc/shared/include/Commands/PIDSubsystem.h b/wpilibc/shared/include/Commands/PIDSubsystem.h index 133ddd4291..f5f13db903 100644 --- a/wpilibc/shared/include/Commands/PIDSubsystem.h +++ b/wpilibc/shared/include/Commands/PIDSubsystem.h @@ -5,8 +5,7 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -#ifndef __PID_SUBSYSTEM_H__ -#define __PID_SUBSYSTEM_H__ +#pragma once #include "Commands/Subsystem.h" #include "PIDController.h" @@ -70,5 +69,3 @@ class PIDSubsystem : public Subsystem, public PIDOutput, public PIDSource { virtual void InitTable(std::shared_ptr table); virtual std::string GetSmartDashboardType() const; }; - -#endif diff --git a/wpilibc/shared/include/Commands/PrintCommand.h b/wpilibc/shared/include/Commands/PrintCommand.h index 7d4a82c1e2..e63dd2a9ad 100644 --- a/wpilibc/shared/include/Commands/PrintCommand.h +++ b/wpilibc/shared/include/Commands/PrintCommand.h @@ -5,8 +5,7 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -#ifndef __PRINT_COMMAND_H__ -#define __PRINT_COMMAND_H__ +#pragma once #include #include "Commands/Command.h" @@ -26,5 +25,3 @@ class PrintCommand : public Command { private: std::string m_message; }; - -#endif diff --git a/wpilibc/shared/include/Commands/Scheduler.h b/wpilibc/shared/include/Commands/Scheduler.h index 935facd14f..8e5d7f7e93 100644 --- a/wpilibc/shared/include/Commands/Scheduler.h +++ b/wpilibc/shared/include/Commands/Scheduler.h @@ -5,8 +5,7 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -#ifndef __SCHEDULER_H__ -#define __SCHEDULER_H__ +#pragma once #include #include @@ -67,4 +66,3 @@ class Scheduler : public ErrorBase, public NamedSendable { std::shared_ptr m_table; bool m_runningCommandsChanged = false; }; -#endif diff --git a/wpilibc/shared/include/Commands/StartCommand.h b/wpilibc/shared/include/Commands/StartCommand.h index 2a1251cb97..2daa147526 100644 --- a/wpilibc/shared/include/Commands/StartCommand.h +++ b/wpilibc/shared/include/Commands/StartCommand.h @@ -5,8 +5,7 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -#ifndef __START_COMMAND_H__ -#define __START_COMMAND_H__ +#pragma once #include "Commands/Command.h" @@ -25,5 +24,3 @@ class StartCommand : public Command { private: Command* m_commandToFork; }; - -#endif diff --git a/wpilibc/shared/include/Commands/Subsystem.h b/wpilibc/shared/include/Commands/Subsystem.h index 0baa42d216..64c85ba159 100644 --- a/wpilibc/shared/include/Commands/Subsystem.h +++ b/wpilibc/shared/include/Commands/Subsystem.h @@ -5,8 +5,7 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -#ifndef __SUBSYSTEM_H__ -#define __SUBSYSTEM_H__ +#pragma once #include #include @@ -46,5 +45,3 @@ class Subsystem : public ErrorBase, public NamedSendable { protected: std::shared_ptr m_table; }; - -#endif diff --git a/wpilibc/shared/include/Commands/WaitCommand.h b/wpilibc/shared/include/Commands/WaitCommand.h index 3cfafd0af0..2f10e96dd5 100644 --- a/wpilibc/shared/include/Commands/WaitCommand.h +++ b/wpilibc/shared/include/Commands/WaitCommand.h @@ -5,8 +5,7 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -#ifndef __WAIT_COMMAND_H__ -#define __WAIT_COMMAND_H__ +#pragma once #include "Commands/Command.h" @@ -23,5 +22,3 @@ class WaitCommand : public Command { virtual void End(); virtual void Interrupted(); }; - -#endif diff --git a/wpilibc/shared/include/Commands/WaitForChildren.h b/wpilibc/shared/include/Commands/WaitForChildren.h index c041e6fa99..b6fe1cc187 100644 --- a/wpilibc/shared/include/Commands/WaitForChildren.h +++ b/wpilibc/shared/include/Commands/WaitForChildren.h @@ -5,8 +5,7 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -#ifndef __WAIT_FOR_CHILDREN_H__ -#define __WAIT_FOR_CHILDREN_H__ +#pragma once #include "Commands/Command.h" @@ -23,5 +22,3 @@ class WaitForChildren : public Command { virtual void End(); virtual void Interrupted(); }; - -#endif diff --git a/wpilibc/shared/include/Commands/WaitUntilCommand.h b/wpilibc/shared/include/Commands/WaitUntilCommand.h index 9ce9ab4cc5..1fda21fea0 100644 --- a/wpilibc/shared/include/Commands/WaitUntilCommand.h +++ b/wpilibc/shared/include/Commands/WaitUntilCommand.h @@ -5,8 +5,7 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -#ifndef __WAIT_UNTIL_COMMAND_H__ -#define __WAIT_UNTIL_COMMAND_H__ +#pragma once #include "Commands/Command.h" @@ -26,5 +25,3 @@ class WaitUntilCommand : public Command { private: double m_time; }; - -#endif diff --git a/wpilibc/shared/include/LiveWindow/LiveWindow.h b/wpilibc/shared/include/LiveWindow/LiveWindow.h index f06e77c6d5..3f3e64e4a5 100644 --- a/wpilibc/shared/include/LiveWindow/LiveWindow.h +++ b/wpilibc/shared/include/LiveWindow/LiveWindow.h @@ -5,8 +5,7 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -#ifndef _LIVE_WINDOW_H -#define _LIVE_WINDOW_H +#pragma once #include #include @@ -82,5 +81,3 @@ class LiveWindow { bool m_enabled = false; bool m_firstTime = true; }; - -#endif diff --git a/wpilibc/shared/include/LiveWindow/LiveWindowSendable.h b/wpilibc/shared/include/LiveWindow/LiveWindowSendable.h index 16debcca5b..1bcba59cb5 100644 --- a/wpilibc/shared/include/LiveWindow/LiveWindowSendable.h +++ b/wpilibc/shared/include/LiveWindow/LiveWindowSendable.h @@ -5,8 +5,7 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -#ifndef LIVEWINDOWSENDABLE_H_ -#define LIVEWINDOWSENDABLE_H_ +#pragma once #include "SmartDashboard/Sendable.h" @@ -35,5 +34,3 @@ class LiveWindowSendable : public Sendable { */ virtual void StopLiveWindowMode() = 0; }; - -#endif /* LIVEWINDOWSENDABLE_H_ */ diff --git a/wpilibc/shared/include/LiveWindow/LiveWindowStatusListener.h b/wpilibc/shared/include/LiveWindow/LiveWindowStatusListener.h index 88b373b26c..6eed487333 100644 --- a/wpilibc/shared/include/LiveWindow/LiveWindowStatusListener.h +++ b/wpilibc/shared/include/LiveWindow/LiveWindowStatusListener.h @@ -5,8 +5,7 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -#ifndef _LIVE_WINDOW_STATUS_LISTENER_H -#define _LIVE_WINDOW_STATUS_LISTENER_H +#pragma once #include "tables/ITable.h" #include "tables/ITableListener.h" @@ -16,5 +15,3 @@ class LiveWindowStatusListener : public ITableListener { virtual void ValueChanged(ITable* source, llvm::StringRef key, std::shared_ptr value, bool isNew); }; - -#endif diff --git a/wpilibc/shared/include/SmartDashboard/NamedSendable.h b/wpilibc/shared/include/SmartDashboard/NamedSendable.h index 4bc3f8838d..b62f20515d 100644 --- a/wpilibc/shared/include/SmartDashboard/NamedSendable.h +++ b/wpilibc/shared/include/SmartDashboard/NamedSendable.h @@ -1,12 +1,11 @@ -/* - * NamedSendable.h - * - * Created on: Oct 19, 2012 - * Author: Mitchell Wills - */ +/*----------------------------------------------------------------------------*/ +/* Copyright (c) FIRST 2012-2016. All Rights Reserved. */ +/* Open Source Software - may be modified and shared by FRC teams. The code */ +/* must be accompanied by the FIRST BSD license file in the root directory of */ +/* the project. */ +/*----------------------------------------------------------------------------*/ -#ifndef NAMEDSENDABLE_H_ -#define NAMEDSENDABLE_H_ +#pragma once #include #include "SmartDashboard/Sendable.h" @@ -24,5 +23,3 @@ class NamedSendable : public Sendable { */ virtual std::string GetName() const = 0; }; - -#endif /* NAMEDSENDABLE_H_ */ diff --git a/wpilibc/shared/include/SmartDashboard/Sendable.h b/wpilibc/shared/include/SmartDashboard/Sendable.h index f38e56d45f..56ec98c690 100644 --- a/wpilibc/shared/include/SmartDashboard/Sendable.h +++ b/wpilibc/shared/include/SmartDashboard/Sendable.h @@ -5,8 +5,7 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -#ifndef __SMART_DASHBOARD_DATA__ -#define __SMART_DASHBOARD_DATA__ +#pragma once #include #include @@ -31,5 +30,3 @@ class Sendable { */ virtual std::string GetSmartDashboardType() const = 0; }; - -#endif diff --git a/wpilibc/shared/include/SmartDashboard/SendableChooser.h b/wpilibc/shared/include/SmartDashboard/SendableChooser.h index 8ce5c2bb42..53aa4cf1e8 100644 --- a/wpilibc/shared/include/SmartDashboard/SendableChooser.h +++ b/wpilibc/shared/include/SmartDashboard/SendableChooser.h @@ -5,8 +5,7 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -#ifndef __SENDABLE_CHOOSER_H__ -#define __SENDABLE_CHOOSER_H__ +#pragma once #include #include @@ -44,5 +43,3 @@ class SendableChooser : public Sendable { std::map m_choices; std::shared_ptr m_table; }; - -#endif diff --git a/wpilibc/shared/include/SmartDashboard/SmartDashboard.h b/wpilibc/shared/include/SmartDashboard/SmartDashboard.h index 2d5932ef50..20eb2ac4a2 100644 --- a/wpilibc/shared/include/SmartDashboard/SmartDashboard.h +++ b/wpilibc/shared/include/SmartDashboard/SmartDashboard.h @@ -5,8 +5,7 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -#ifndef __SMART_DASHBOARD_H__ -#define __SMART_DASHBOARD_H__ +#pragma once #include #include @@ -49,5 +48,3 @@ class SmartDashboard : public SensorBase { */ static std::map, Sendable*> m_tablesToData; }; - -#endif diff --git a/wpilibc/shared/include/interfaces/Potentiometer.h b/wpilibc/shared/include/interfaces/Potentiometer.h index 1c2e99a4dd..be48a55fa5 100644 --- a/wpilibc/shared/include/interfaces/Potentiometer.h +++ b/wpilibc/shared/include/interfaces/Potentiometer.h @@ -5,8 +5,7 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -#ifndef INTERFACES_POTENTIOMETER_H -#define INTERFACES_POTENTIOMETER_H +#pragma once #include "PIDSource.h" @@ -26,5 +25,3 @@ class Potentiometer : public PIDSource { virtual void SetPIDSourceType(PIDSourceType pidSource) override; }; - -#endif diff --git a/wpilibc/sim/include/Joystick.h b/wpilibc/sim/include/Joystick.h index c04ddbb82b..2421080e61 100644 --- a/wpilibc/sim/include/Joystick.h +++ b/wpilibc/sim/include/Joystick.h @@ -5,8 +5,7 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -#ifndef JOYSTICK_H_ -#define JOYSTICK_H_ +#pragma once #include #include "ErrorBase.h" @@ -77,5 +76,3 @@ class Joystick : public GenericHID, public ErrorBase { std::unique_ptr m_axes; std::unique_ptr m_buttons; }; - -#endif diff --git a/wpilibc/sim/include/simulation/MainNode.h b/wpilibc/sim/include/simulation/MainNode.h index 9f17452ef7..8654c4a5da 100644 --- a/wpilibc/sim/include/simulation/MainNode.h +++ b/wpilibc/sim/include/simulation/MainNode.h @@ -5,8 +5,7 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -#ifndef _SIM_MAIN_NODE_H -#define _SIM_MAIN_NODE_H +#pragma once #include #include @@ -59,5 +58,3 @@ class MainNode { } } }; - -#endif diff --git a/wpilibc/sim/include/simulation/SimContinuousOutput.h b/wpilibc/sim/include/simulation/SimContinuousOutput.h index b1c81ed3e0..992ba5b11a 100644 --- a/wpilibc/sim/include/simulation/SimContinuousOutput.h +++ b/wpilibc/sim/include/simulation/SimContinuousOutput.h @@ -5,8 +5,7 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -#ifndef _SIM_SPEED_CONTROLLER_H -#define _SIM_SPEED_CONTROLLER_H +#pragma once #ifdef _WIN32 // Ensure that Winsock2.h is included before Windows.h, which can get @@ -42,5 +41,3 @@ class SimContinuousOutput { */ float Get(); }; - -#endif diff --git a/wpilibc/sim/include/simulation/SimDigitalInput.h b/wpilibc/sim/include/simulation/SimDigitalInput.h index 5bc5542f46..8a92e0f61d 100644 --- a/wpilibc/sim/include/simulation/SimDigitalInput.h +++ b/wpilibc/sim/include/simulation/SimDigitalInput.h @@ -5,8 +5,7 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -#ifndef _SIM_DIGITAL_INPUT_H -#define _SIM_DIGITAL_INPUT_H +#pragma once #include #include "simulation/gz_msgs/msgs.h" @@ -27,5 +26,3 @@ class SimDigitalInput { transport::SubscriberPtr sub; void callback(const msgs::ConstBoolPtr& msg); }; - -#endif diff --git a/wpilibc/sim/include/simulation/SimEncoder.h b/wpilibc/sim/include/simulation/SimEncoder.h index ea3eb976cb..1e629e07c9 100644 --- a/wpilibc/sim/include/simulation/SimEncoder.h +++ b/wpilibc/sim/include/simulation/SimEncoder.h @@ -5,8 +5,7 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -#ifndef _SIM_ENCODER_H -#define _SIM_ENCODER_H +#pragma once #include #include @@ -33,5 +32,3 @@ class SimEncoder { void positionCallback(const msgs::ConstFloat64Ptr& msg); void velocityCallback(const msgs::ConstFloat64Ptr& msg); }; - -#endif diff --git a/wpilibc/sim/include/simulation/SimFloatInput.h b/wpilibc/sim/include/simulation/SimFloatInput.h index f43be1d229..1857ff218b 100644 --- a/wpilibc/sim/include/simulation/SimFloatInput.h +++ b/wpilibc/sim/include/simulation/SimFloatInput.h @@ -5,8 +5,7 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -#ifndef _SIM_FLOAT_INPUT_H -#define _SIM_FLOAT_INPUT_H +#pragma once #include #include "simulation/gz_msgs/msgs.h" @@ -27,5 +26,3 @@ class SimFloatInput { transport::SubscriberPtr sub; void callback(const msgs::ConstFloat64Ptr& msg); }; - -#endif diff --git a/wpilibc/sim/include/simulation/SimGyro.h b/wpilibc/sim/include/simulation/SimGyro.h index 48a7697703..8402170cd2 100644 --- a/wpilibc/sim/include/simulation/SimGyro.h +++ b/wpilibc/sim/include/simulation/SimGyro.h @@ -5,8 +5,7 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -#ifndef _SIM_GYRO_H -#define _SIM_GYRO_H +#pragma once #include #include "simulation/gz_msgs/msgs.h" @@ -30,5 +29,3 @@ class SimGyro { void positionCallback(const msgs::ConstFloat64Ptr& msg); void velocityCallback(const msgs::ConstFloat64Ptr& msg); }; - -#endif diff --git a/wpilibj/src/athena/cpp/.gitignore b/wpilibj/src/athena/cpp/.gitignore index 535c157308..bcc52fede8 100644 --- a/wpilibj/src/athena/cpp/.gitignore +++ b/wpilibj/src/athena/cpp/.gitignore @@ -1,2 +1,2 @@ *~ -target/ \ No newline at end of file +target/ diff --git a/wpilibjIntegrationTests/runintegrationjavaprogram b/wpilibjIntegrationTests/runintegrationjavaprogram index 5a4128bf06..dc80c8d9f8 100644 --- a/wpilibjIntegrationTests/runintegrationjavaprogram +++ b/wpilibjIntegrationTests/runintegrationjavaprogram @@ -2,4 +2,4 @@ killall java killall FRCUserProgram sleep 1 -/usr/local/frc/JRE/bin/java -ea -jar wpilibJavaIntegrationTests-0.1.0-SNAPSHOT.jar $@ \ No newline at end of file +/usr/local/frc/JRE/bin/java -ea -jar wpilibJavaIntegrationTests-0.1.0-SNAPSHOT.jar $@ diff --git a/wpilibjIntegrationTests/src/main/resources/logging.properties b/wpilibjIntegrationTests/src/main/resources/logging.properties index 304d41a407..8a6ddddb5c 100644 --- a/wpilibjIntegrationTests/src/main/resources/logging.properties +++ b/wpilibjIntegrationTests/src/main/resources/logging.properties @@ -23,6 +23,3 @@ java.util.logging.ConsoleHandler.formatter=java.util.logging.SimpleFormatter ############################################################ edu.wpi.first.wpilibj.level=INFO edu.wpi.first.wpilibj.command.level=INFO - - -