Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/org/parts3492/partslib/PARTsCandle.java
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,9 @@ public enum Color {
* @param canID The ID of the CANdle hardware.
* @param ledLength The length of LEDs attached to the CANdle.
*/
public PARTsCandle(String className, int canID, int ledLength) {
public PARTsCandle(String className, int canID, int ledLength, String canBusName) {
super(className);
CANBus canbus = new CANBus("rio");
CANBus canbus = new CANBus(canBusName);
candle = new CANdle(canID, canbus);
LED_LENGTH = ledLength;

Expand Down
9 changes: 9 additions & 0 deletions src/org/parts3492/partslib/PARTsUnit.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,15 @@ public PARTsUnitType getUnitType() {
return unitType;
}

/**
* Converts current unit into the requested unit.
*
* @param unitType The target unit.
* @return Converted unit in double.
*/
public PARTsUnit toPARTsUnit(PARTsUnitType unitType) {
return new PARTsUnit(to(unitType), unitType);
}
/**
* Converts current unit into the requested unit.
*
Expand Down
Loading