Skip to content

Commit 6f24ed3

Browse files
authored
Merge pull request #142 from errorcodexero/timestampfix
2 parents 1a5bef4 + 61209ee commit 6f24ed3

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

src/main/java/frc/robot/subsystems/funnel/FunnelSubsystem.java

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ public void periodic() {
3232
Logger.processInputs("Funnel", inputs_);
3333

3434
disconnectedAlert_.set(!inputs_.funnelReady);
35-
35+
3636
if (inputs_.coralFunnelUpperSensor) {
37-
lastuppercoral = Timer.getFPGATimestamp();
37+
lastuppercoral = Timer.getTimestamp();
3838
}
3939

4040
if (inputs_.coralFunnelLowerSensor) {
41-
lastlowercoral = Timer.getFPGATimestamp();
41+
lastlowercoral = Timer.getTimestamp();
4242
}
4343

4444
Logger.recordOutput("funnel/seencoral", hasSeenCoral());
@@ -58,12 +58,10 @@ public boolean isAtTarget() {
5858
}
5959

6060
/**
61-
* Functionally the same as {@link #hasSeenCoral()}, but in the event that you have seen coral,
62-
* this automatically resets the flag for you.
63-
* @return Whether or not the Funnel has seen a Coral since the last {@link #resetSeenCoral()}.
61+
* Whether or not the Funnel has seen a Coral in the last few seconds.
6462
*/
6563
public boolean hasSeenCoral() {
66-
double now = Timer.getFPGATimestamp() ;
64+
double now = Timer.getTimestamp() ;
6765

6866
// if (now - lastuppercoral < kCoralLastSeenTimeout) {
6967
// return true ;

0 commit comments

Comments
 (0)