Skip to content

Commit

Permalink
Fix PID controller
Browse files Browse the repository at this point in the history
  • Loading branch information
j5155 committed Dec 2, 2024
1 parent f0eb208 commit 4ddc5e7
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ open class PIDFController
*/
@JvmOverloads
open fun update(
timestamp: Long,
timestamp: Long = System.nanoTime(),
measuredPosition: Double,
measuredVelocity: Double? = null
): Double {
Expand Down Expand Up @@ -166,7 +166,7 @@ open class PIDFController
fun update(
measuredPosition: Double
): Double {
return update(measuredPosition=measuredPosition)
return update(System.nanoTime(),measuredPosition)
}


Expand Down

0 comments on commit 4ddc5e7

Please sign in to comment.