Useful for catching bad behavior when doing math or configuring ratios
with integers. Errors can be turned off with
`@SuppressWarnings("IntegerDivision")`
```java
double kV = 12 / 6000; // error: integer division in a floating-point context
double kV = 12. / 6000; // OK
double kV = 12 / 6000.; // OK
int kV = 12 / 6000; // OK, but evaluates to 0
double ratio = 42 / 12; // error: integer division in a floating-point context
@SuppressWarnings("IntegerDivision")
double ratio = 42 / 12; // OK, evaluates to 2
```
```
Execution failed for task ':developerRobot:compileJava'.
> Compilation failed; see the compiler output below.
/Users/sam/code/wpilib/allwpilib/developerRobot/src/main/java/wpilib/robot/Robot.java:10: error: integer division in a floating-point context
double kV = 12 / 6000;
^
1 error
```
Also adds the compiler plugin as a dependency to the developerRobot
project for dev testing
Developer Robot
This is a robot project built directly against this repo's sources. It builds the minimum required for deploying to a Systemcore, so it's faster than publishing the whole library to Maven first.
This command builds everything.
./gradlew developerRobot:build
Simulation
This command runs the Java project on desktop.
./gradlew developerRobot:run
This command runs the C++ project on desktop.
./gradlew developerRobot:runCpp
Deploy to a Systemcore
This project can only deploy over USB. If an alternate IP address is preferred, the address block in developerRobot\build.gradle can be changed to point to another address.
This command deploys the C++ project using shared dependencies. Prefer this one for most C++ development.
./gradlew developerRobot:deployShared
This command deploys the C++ project with all dependencies statically linked.
./gradlew developerRobot:deployStatic
This command deploys the Java project and all required dependencies.
./gradlew developerRobot:deployJava
Those commands won't start the robot executable, so you have to manually ssh in and start it. The following command will do that.
ssh systemcore@robot.local sudo systemctl stop robot
ssh systemcore@robot.local sudo ~/robotCommand
Console log prints will appear in the terminal.
Deploying any of these to a Systemcore will disable the current startup project until it is redeployed.