Skip to content

Latest commit

 

History

History
49 lines (47 loc) · 1.14 KB

File metadata and controls

49 lines (47 loc) · 1.14 KB

2018-PowerUp

What is this?

This is the repository for the FRC2410 C++-to-Java robot rewrite.

Differences between Java and C++:

C++ Java
Casing Uppercase first letter (e.g. "CamelCase()") Lowercase first letter (e.g. "camelCase()")
Utility functions Simply call functions (e.g. "Wait(1.0)") All functions are methods in classes (e.g. "Timer.delay(1.0)")
Digital inputs (also applies to outputs) 1 (open), 0 (closed) True (open), False (closed)
Namespaces and Pointers (ex) Robot::oi->joy1 (ex) Robot.oi.joy1
See more: http://first.wpi.edu/Images/CMS/First/WPILibUsersGuide.pdf

Style Guide

(not final)
Tabs, not spaces (spaces for alignment only)
Spaces after if, for, while, switch, etc. but not after functions
Open brackets on same line, closed on new
e.g.:
function foo(bar) {
  if (bar) {
    fooBar();
  }
}