Skip to content

Commit

Permalink
for formatting commits
Browse files Browse the repository at this point in the history
  • Loading branch information
Greg Perry committed Jan 17, 2019
1 parent 260093a commit cac8231
Show file tree
Hide file tree
Showing 936 changed files with 167,714 additions and 167,725 deletions.
590 changes: 295 additions & 295 deletions mrl_java_formatter.xml

Large diffs are not rendered by default.

526 changes: 267 additions & 259 deletions src/main/java/PeerDiscovery.java

Large diffs are not rendered by default.

763 changes: 383 additions & 380 deletions src/main/java/Sample.java

Large diffs are not rendered by default.

893 changes: 448 additions & 445 deletions src/main/java/SampleAsyncCallback.java

Large diffs are not rendered by default.

2,733 changes: 1,375 additions & 1,358 deletions src/main/java/SimpleOpenNI/SimpleOpenNI.java

Large diffs are not rendered by default.

1,399 changes: 690 additions & 709 deletions src/main/java/org/myrobotlab/arduino/ArduinoMsgGenerator.java

Large diffs are not rendered by default.

455 changes: 234 additions & 221 deletions src/main/java/org/myrobotlab/arduino/ArduinoUtils.java

Large diffs are not rendered by default.

247 changes: 124 additions & 123 deletions src/main/java/org/myrobotlab/arduino/BoardInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,128 +10,129 @@
*/
public class BoardInfo implements Serializable {

private static final long serialVersionUID = 1L;
transient public final static Logger log = LoggerFactory.getLogger(BoardInfo.class);

// requested by the user
// String boardName;

// reported from the board
// Integer boardId;
Integer version;

// FIXME - isUserSet isBoardSet isLoaded - BoardType as a class ?? - to String
// give {board}name ?
// boolean valid = false;

// dynamic changing values
Integer sram;
Integer microsPerLoop;
Integer activePins;
DeviceSummary[] deviceSummary; // deviceList with types

// if true boardInfo will be published at a regular 1s interval
boolean enableBoardInfo = false;
public long heartbeatMs;

public BoardInfo() {
// setType(-1);
}

public BoardInfo(int version) {
this.version = version;
// this.boardId = boardId;
}

/*
* public String getName() { return boardName; }
*/
/*
*
* public boolean isUnknown() { return (boardName == null) ||
* boardName.equals("unknown"); }
*/
/*
*
* public void setType(int boardId) { this.boardId = boardId; switch (boardId) {
* case Arduino.BOARD_TYPE_ID_MEGA: boardName = Arduino.BOARD_TYPE_MEGA; break;
* case Arduino.BOARD_TYPE_ID_UNO: boardName = Arduino.BOARD_TYPE_UNO; break;
* case Arduino.BOARD_TYPE_ID_ADK_MEGA: boardName = Arduino.BOARD_TYPE_MEGA_ADK;
* break; case Arduino.BOARD_TYPE_ID_NANO: boardName = Arduino.BOARD_TYPE_NANO;
* break; case Arduino.BOARD_TYPE_ID_PRO_MINI: boardName =
* Arduino.BOARD_TYPE_PRO_MINI; break; default: boardName = "unknown"; break; }
* }
*/

/**
* called on disconnect() so it can re-initalize if connected to a different
* arduino
*/
public void reset() {
// boardId = -1;
version = null;
// boardName = null;
// valid = false;
}

public Integer getVersion() {
return version;
}

public void setVersion(Integer version) {
// valid = true;
this.version = version;
}

/*
* public boolean isValid() { return valid; }
*/

/*
* public void setType(String board) { boardName = board; if
* (Arduino.BOARD_TYPE_MEGA.equals(board)) { boardId =
* Arduino.BOARD_TYPE_ID_MEGA; } else if
* (Arduino.BOARD_TYPE_MEGA_ADK.equals(board)) { boardId =
* Arduino.BOARD_TYPE_ID_ADK_MEGA; } else if
* (Arduino.BOARD_TYPE_UNO.equals(board)) { boardId = Arduino.BOARD_TYPE_ID_UNO;
* } else if (Arduino.BOARD_TYPE_NANO.equals(board)) { boardId =
* Arduino.BOARD_TYPE_ID_NANO; } else if
* (Arduino.BOARD_TYPE_PRO_MINI.equals(board)) { boardId =
* Arduino.BOARD_TYPE_ID_PRO_MINI; } else { boardId =
* Arduino.BOARD_TYPE_ID_UNKNOWN; } }
*/
/*
* public int getBoardType() { return boardId; }
*/

public void setMicrosPerLoop(int microsPerLoop) {
this.microsPerLoop = microsPerLoop;
}

public void setSram(Integer sram) {
this.sram = sram;
}

public void setDeviceSummary(DeviceSummary[] deviceSummary) {
this.deviceSummary = deviceSummary;
}

public void setActivePins(Integer activePins) {
this.activePins = activePins;
}

public String toString() {
if (version != null) {
/*
* return String.format("%s version %s load %d heartbeat %d sram %d devices %d",
* boardName, version, microsPerLoop, heartbeatMs, sram, (deviceSummary != null)
* ? deviceSummary.length : 0);
*/
return String.format("version %s load %d heartbeat %d sram %d devices %d", version, microsPerLoop,
heartbeatMs, sram, (deviceSummary != null) ? deviceSummary.length : 0);
} else {
return "unknown";
}
}
private static final long serialVersionUID = 1L;
transient public final static Logger log = LoggerFactory.getLogger(BoardInfo.class);

// requested by the user
// String boardName;

// reported from the board
// Integer boardId;
Integer version;

// FIXME - isUserSet isBoardSet isLoaded - BoardType as a class ?? - to String
// give {board}name ?
// boolean valid = false;

// dynamic changing values
Integer sram;
Integer microsPerLoop;
Integer activePins;
DeviceSummary[] deviceSummary; // deviceList with types

// if true boardInfo will be published at a regular 1s interval
boolean enableBoardInfo = false;
public long heartbeatMs;

public BoardInfo() {
// setType(-1);
}

public BoardInfo(int version) {
this.version = version;
// this.boardId = boardId;
}

/*
* public String getName() { return boardName; }
*/
/*
*
* public boolean isUnknown() { return (boardName == null) ||
* boardName.equals("unknown"); }
*/
/*
*
* public void setType(int boardId) { this.boardId = boardId; switch (boardId)
* { case Arduino.BOARD_TYPE_ID_MEGA: boardName = Arduino.BOARD_TYPE_MEGA;
* break; case Arduino.BOARD_TYPE_ID_UNO: boardName = Arduino.BOARD_TYPE_UNO;
* break; case Arduino.BOARD_TYPE_ID_ADK_MEGA: boardName =
* Arduino.BOARD_TYPE_MEGA_ADK; break; case Arduino.BOARD_TYPE_ID_NANO:
* boardName = Arduino.BOARD_TYPE_NANO; break; case
* Arduino.BOARD_TYPE_ID_PRO_MINI: boardName = Arduino.BOARD_TYPE_PRO_MINI;
* break; default: boardName = "unknown"; break; } }
*/

/**
* called on disconnect() so it can re-initalize if connected to a different
* arduino
*/
public void reset() {
// boardId = -1;
version = null;
// boardName = null;
// valid = false;
}

public Integer getVersion() {
return version;
}

public void setVersion(Integer version) {
// valid = true;
this.version = version;
}

/*
* public boolean isValid() { return valid; }
*/

/*
* public void setType(String board) { boardName = board; if
* (Arduino.BOARD_TYPE_MEGA.equals(board)) { boardId =
* Arduino.BOARD_TYPE_ID_MEGA; } else if
* (Arduino.BOARD_TYPE_MEGA_ADK.equals(board)) { boardId =
* Arduino.BOARD_TYPE_ID_ADK_MEGA; } else if
* (Arduino.BOARD_TYPE_UNO.equals(board)) { boardId =
* Arduino.BOARD_TYPE_ID_UNO; } else if
* (Arduino.BOARD_TYPE_NANO.equals(board)) { boardId =
* Arduino.BOARD_TYPE_ID_NANO; } else if
* (Arduino.BOARD_TYPE_PRO_MINI.equals(board)) { boardId =
* Arduino.BOARD_TYPE_ID_PRO_MINI; } else { boardId =
* Arduino.BOARD_TYPE_ID_UNKNOWN; } }
*/
/*
* public int getBoardType() { return boardId; }
*/

public void setMicrosPerLoop(int microsPerLoop) {
this.microsPerLoop = microsPerLoop;
}

public void setSram(Integer sram) {
this.sram = sram;
}

public void setDeviceSummary(DeviceSummary[] deviceSummary) {
this.deviceSummary = deviceSummary;
}

public void setActivePins(Integer activePins) {
this.activePins = activePins;
}

public String toString() {
if (version != null) {
/*
* return
* String.format("%s version %s load %d heartbeat %d sram %d devices %d",
* boardName, version, microsPerLoop, heartbeatMs, sram, (deviceSummary !=
* null) ? deviceSummary.length : 0);
*/
return String.format("version %s load %d heartbeat %d sram %d devices %d", version, microsPerLoop, heartbeatMs, sram, (deviceSummary != null) ? deviceSummary.length : 0);
} else {
return "unknown";
}
}

}
84 changes: 42 additions & 42 deletions src/main/java/org/myrobotlab/arduino/BoardType.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,47 +3,47 @@
// FIXME FIXME FIXME !!! - this should not be in the Arduino package
public class BoardType {

/**
* display name of the board - this will be what a user sees in the dropdown
*/
String name;

/**
* unique string key of the board e.g. for Arduino mega, nano, uno, ...
*/
String board;

/**
* unique identifier of the board
*/
Integer id;

public String toString() {
return name;
}

public void setName(String name) {
this.name = name;
}

public void setBoard(String board) {
this.board = board;
}

public void setId(int id) {
this.id = id;
}

public String getName() {
return name;
}

public String getBoard() {
return board;
}

public int getId() {
return id;
}
/**
* display name of the board - this will be what a user sees in the dropdown
*/
String name;

/**
* unique string key of the board e.g. for Arduino mega, nano, uno, ...
*/
String board;

/**
* unique identifier of the board
*/
Integer id;

public String toString() {
return name;
}

public void setName(String name) {
this.name = name;
}

public void setBoard(String board) {
this.board = board;
}

public void setId(int id) {
this.id = id;
}

public String getName() {
return name;
}

public String getBoard() {
return board;
}

public int getId() {
return id;
}

}
22 changes: 11 additions & 11 deletions src/main/java/org/myrobotlab/arduino/DeviceSummary.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
import java.io.Serializable;

public class DeviceSummary implements Serializable {
private static final long serialVersionUID = 1L;
private static final long serialVersionUID = 1L;

String name;
Integer id;
String type;
Integer typeId;
String name;
Integer id;
String type;
Integer typeId;

public DeviceSummary(String name, int id, String type, int typeId) {
this.name = name;
this.id = id;
this.type = type;
this.typeId = typeId;
}
public DeviceSummary(String name, int id, String type, int typeId) {
this.name = name;
this.id = id;
this.type = type;
this.typeId = typeId;
}
}
Loading

0 comments on commit cac8231

Please sign in to comment.