From 2ff5f21df0ef569ef9239e5091b9d4370919e4c4 Mon Sep 17 00:00:00 2001 From: Boppitystar Date: Sun, 24 May 2026 09:47:28 -0600 Subject: [PATCH 1/3] coding conventions --- Conventions.java | 28 +++++++++++++++------- README.md | 11 +++++++-- vendordeps/WPILibNewCommands.json | 39 +++++++++++++++++++++++++++++++ 3 files changed, 67 insertions(+), 11 deletions(-) create mode 100644 vendordeps/WPILibNewCommands.json diff --git a/Conventions.java b/Conventions.java index f0f8406..59642b2 100644 --- a/Conventions.java +++ b/Conventions.java @@ -1,5 +1,5 @@ // -// FRC Team 2910 coding conventions for the Java programming language +// FRC Team 9449 coding conventions for the Java programming language // public class Conventions { // classes use UpperCamelCase @@ -8,22 +8,32 @@ public class Conventions { // classes use UpperCamelCase private double thisIsAField = 2.71828; // all fields are lowerCamelCase + private double mVariable = 22; //all member variables have mCamelCase + // when reading variables, use "get" and "set" as prefixes - public int getJackInTheBotTeamNumber() { // method names are lowerCamelCase, and should describe exactly what the method does - return 2910; + public int getYellowjacketsTeamNumber() { // method names are lowerCamelCase, and should describe exactly what the method does + return 9449; } public void setExampleFieldVariable(double thisIsAField) { // method names are lowerCamelCase, and should describe exactly what the method does this.thisIsAField = thisIsAField; } + //command based structure should have runCamelCase + //example below + + // public Command runIntakeBumpCommand() { + // return run( + // () -> { + // setTargetArmPosition(ArmConstants.PIVOT_BUMP); + // }); + // } + + public enum EVENT { // enums use SCREAMING_SNAKE_CASE - SAMMAMISH, - AUBURN, - DISTRICT_CHAMPS, - FIRST_CMP, - INDIANA_ROBOTICS_INVITATIONAL, - CHEZY_CHAMPS + CANPAC, + IDAHO, + WORLD_CHAMPIONSHIPS } } diff --git a/README.md b/README.md index 8d74f5b..94870cf 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,12 @@ # FRC Team 2910 coding conventions -This is the repository containing FRC Team 2910's coding conventions for programming languages they use. +This is the repository containing FRC Team 9449's coding conventions for Java and ALL repositories -Are we missing something? Are we unclear? If you are on our team contact us through slack, otherwise submit an issue! +* Variables should be “camelCase” +* Constants should be “UPPER_SNAKE_CASE” +* Classes should be “PascalCase” +* Member variables should begin with to “m” and camel cased (ie. mMotorLeft, mSubsystem, etc.) +* With exceptions, line length should be no longer than 70 characters +* With exceptions, variable names should be no greater than 20 characters + +If there is something missing create an issue in the Kanban board. diff --git a/vendordeps/WPILibNewCommands.json b/vendordeps/WPILibNewCommands.json new file mode 100644 index 0000000..69348e4 --- /dev/null +++ b/vendordeps/WPILibNewCommands.json @@ -0,0 +1,39 @@ +{ + "fileName": "WPILibNewCommands.json", + "name": "WPILib-New-Commands", + "version": "1.0.0", + "uuid": "111e20f7-815e-48f8-9dd6-e675ce75b266", + "frcYear": "2026", + "mavenUrls": [], + "jsonUrl": "", + "javaDependencies": [ + { + "groupId": "edu.wpi.first.wpilibNewCommands", + "artifactId": "wpilibNewCommands-java", + "version": "wpilib" + } + ], + "jniDependencies": [], + "cppDependencies": [ + { + "groupId": "edu.wpi.first.wpilibNewCommands", + "artifactId": "wpilibNewCommands-cpp", + "version": "wpilib", + "libName": "wpilibNewCommands", + "headerClassifier": "headers", + "sourcesClassifier": "sources", + "sharedLibrary": true, + "skipInvalidPlatforms": true, + "binaryPlatforms": [ + "linuxsystemcore", + "linuxathena", + "linuxarm32", + "linuxarm64", + "windowsx86-64", + "windowsx86", + "linuxx86-64", + "osxuniversal" + ] + } + ] +} \ No newline at end of file From 473308b12e003c20f13f1e196a057ec2a5785f7c Mon Sep 17 00:00:00 2001 From: Boppitystar Date: Sun, 24 May 2026 09:49:16 -0600 Subject: [PATCH 2/3] Update team number in coding conventions --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 94870cf..0627e12 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# FRC Team 2910 coding conventions +# FRC Team 9449 coding conventions This is the repository containing FRC Team 9449's coding conventions for Java and ALL repositories From c48f1b13e2c748ff6614cc003c91096a8099ab4a Mon Sep 17 00:00:00 2001 From: Boppitystar Date: Sat, 6 Jun 2026 16:46:41 -0600 Subject: [PATCH 3/3] added indentations to convention --- Conventions.java | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/Conventions.java b/Conventions.java index 59642b2..55ec63b 100644 --- a/Conventions.java +++ b/Conventions.java @@ -13,27 +13,26 @@ public class Conventions { // classes use UpperCamelCase // when reading variables, use "get" and "set" as prefixes public int getYellowjacketsTeamNumber() { // method names are lowerCamelCase, and should describe exactly what the method does - return 9449; + return 9449; } public void setExampleFieldVariable(double thisIsAField) { // method names are lowerCamelCase, and should describe exactly what the method does - this.thisIsAField = thisIsAField; + this.thisIsAField = thisIsAField; } //command based structure should have runCamelCase //example below - // public Command runIntakeBumpCommand() { - // return run( - // () -> { - // setTargetArmPosition(ArmConstants.PIVOT_BUMP); - // }); + //public Command runIntakeBumpCommand() { + // return run(() -> { + // setTargetArmPosition(ArmConstants.PIVOT_BUMP); + // }); // } - + //indentations are 2 spaces which is 1 tab after you double space the first line public enum EVENT { // enums use SCREAMING_SNAKE_CASE - CANPAC, - IDAHO, - WORLD_CHAMPIONSHIPS + CANPAC, + IDAHO, + WORLD_CHAMPIONSHIPS } }