Skip to content

Commit 88edb11

Browse files
Merge pull request #491 from oss-slu/add-missing-javadoc
Add missing Javadocs
2 parents 3cd10d0 + 66d2735 commit 88edb11

5 files changed

Lines changed: 20 additions & 6 deletions

File tree

pi4micronaut-utils/src/main/java/com/opensourcewithslu/inputdevices/ReedSwitchHelper.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
import org.slf4j.Logger;
66
import org.slf4j.LoggerFactory;
77

8+
/**
9+
* Helper for monitoring a reed switch input.
10+
*/
811
public class ReedSwitchHelper {
912
private static final Logger log = LoggerFactory.getLogger(ReedSwitchHelper.class);
1013

pi4micronaut-utils/src/main/java/com/opensourcewithslu/inputdevices/ThermistorHelper.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
import org.slf4j.Logger;
55
import org.slf4j.LoggerFactory;
66

7+
/**
8+
* Helper for reading thermistor values through an ADC.
9+
*/
710
public class ThermistorHelper {
811
private static final Logger log = LoggerFactory.getLogger(ThermistorHelper.class);
912
private final Spi spi; // SPI interface for ADC communication

pi4micronaut-utils/src/main/java/com/opensourcewithslu/outputdevices/FourDigitSevenSegmentDisplayHelper.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66

77
import java.util.Map;
88

9+
/**
10+
* Helper for controlling a four-digit seven-segment display.
11+
*/
912
public class FourDigitSevenSegmentDisplayHelper {
1013
private static Logger log = LoggerFactory.getLogger(FourDigitSevenSegmentDisplayHelper.class);
1114

pi4micronaut-utils/src/main/java/com/opensourcewithslu/outputdevices/LEDHelper.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ public class LEDHelper {
1616
private final DigitalOutput ledOutput;
1717

1818
/**
19+
* LEDHelper constructor.
1920
*
20-
* LEGHelper constructor.
21-
* @param ledOutput An instance of a Pi4J DigitalOutput object.
21+
* @param ledOutput an instance of a Pi4J DigitalOutput object
2222
*/
2323
//tag::const[]
2424
public LEDHelper(DigitalOutput ledOutput)
@@ -72,10 +72,9 @@ public void switchState()
7272
}
7373

7474
/**
75+
* Blinks the LED for the specified duration.
7576
*
76-
* @param duration blink will take the duration parameter and have the led
77-
* blink for that duration.
78-
*
77+
* @param duration the duration to blink in milliseconds
7978
*/
8079

8180
public void blink (int duration) {

pi4micronaut-utils/src/main/java/com/opensourcewithslu/outputdevices/PassiveBuzzerHelper.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,9 @@ public void passiveBuzzerOff(){
6262
}
6363

6464
/**
65+
* Returns the current default frequency for the passive buzzer.
6566
*
66-
* Logs the passiveBuzzerFreq to the console
67+
* @return the current default frequency in Hz
6768
*/
6869

6970
//tag::method[]
@@ -158,6 +159,11 @@ public void piToneSequence(){
158159
passiveBuzzerOff();
159160
}
160161

162+
/**
163+
* Sleeps for the specified duration.
164+
*
165+
* @param duration the time to sleep in milliseconds
166+
*/
161167
protected void sleep(long duration){
162168
try {
163169
Thread.sleep(duration); // Play each frequency for the specified duration

0 commit comments

Comments
 (0)