sertain / sertain-legacy

:robot: Write more for your robot with less
https://sertain.github.io/javadocs
MIT License
9 stars 3 forks source link

Create a logger #66

Open andrewda opened 5 years ago

andrewda commented 5 years ago

Maybe something heavily based off of https://github.com/dominikWin/badlog for now. Using the same format would allow us to use https://github.com/dominikWin/badlogvis to visualize the data until we can write our own visualizer.

andrewda commented 5 years ago

We can use this issue for discussions on what the logger should look/act like, but here's my general thinking so far:

val logFile = Logger.create("/some/path/to/log_file.bag")

Logger.add("Match Number", Driverstation.getMatchNumber())
Logger.add("Drivetrain Voltage") { Drivetrain.voltage }

launch {
  periodic(0.1) {
    logFile.write()
  }
}