mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
Deprecate SampleRobot (#472)
Suggest TimedRobot as an alternative. Remove -Werror from examples to avoid breaking build.
This commit is contained in:
committed by
Peter Johnson
parent
8744511f1d
commit
3c3a448d47
@@ -7,11 +7,17 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <support/deprecated.h>
|
||||
|
||||
#include "RobotBase.h"
|
||||
|
||||
namespace frc {
|
||||
|
||||
class SampleRobot : public RobotBase {
|
||||
class WPI_DEPRECATED(
|
||||
"WARNING: While it may look like a good choice to use for your code if "
|
||||
"you're inexperienced, don't. Unless you know what you are doing, complex "
|
||||
"code will be much more difficult under this system. Use TimedRobot or "
|
||||
"Command-Based instead.") SampleRobot : public RobotBase {
|
||||
public:
|
||||
void StartCompetition() override;
|
||||
|
||||
|
||||
@@ -22,7 +22,13 @@ import edu.wpi.first.wpilibj.livewindow.LiveWindow;
|
||||
*
|
||||
* <p>Alternatively you can override the robotMain() method and manage all aspects of the robot
|
||||
* yourself.
|
||||
*
|
||||
* @deprecated WARNING: While it may look like a good choice to use for your code if you're
|
||||
* inexperienced, don't. Unless you know what you are doing, complex code will
|
||||
* be much more difficult under this system. Use TimedRobot or Command-Based
|
||||
* instead.
|
||||
*/
|
||||
@Deprecated
|
||||
public class SampleRobot extends RobotBase {
|
||||
|
||||
private boolean m_robotMainOverridden = true;
|
||||
|
||||
@@ -23,7 +23,7 @@ pmd {
|
||||
|
||||
gradle.projectsEvaluated {
|
||||
tasks.withType(JavaCompile) {
|
||||
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation" << "-Werror"
|
||||
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user