[wpilibc] Transition C++ classes to units::second_t (#3396)

A lot of these are breaking changes. frc::Timer was replaced with the
contents of frc2::Timer. The others were in-place argument changes or
removing deprecated non-unit overloads.
This commit is contained in:
Tyler Veness
2021-05-28 22:06:59 -07:00
committed by GitHub
parent 827b17a52b
commit e09293a15e
99 changed files with 503 additions and 790 deletions

View File

@@ -8,6 +8,7 @@
#include <memory>
#include <hal/Interrupts.h>
#include <units/time.h>
#include "frc/AnalogTriggerType.h"
@@ -86,12 +87,12 @@ class InterruptableSensorBase {
* waiting for an interrupt. This is not threadsafe, and can cause memory
* corruption
*
* @param timeout Timeout in seconds
* @param timeout Timeout
* @param ignorePrevious If true, ignore interrupts that happened before
* WaitForInterrupt was called.
* @return What interrupts fired
*/
virtual WaitResult WaitForInterrupt(double timeout,
virtual WaitResult WaitForInterrupt(units::second_t timeout,
bool ignorePrevious = true);
/**
@@ -116,7 +117,7 @@ class InterruptableSensorBase {
*
* @return Timestamp in seconds since boot.
*/
virtual double ReadRisingTimestamp();
virtual units::second_t ReadRisingTimestamp();
/**
* Return the timestamp for the falling interrupt that occurred most recently.
@@ -127,7 +128,7 @@ class InterruptableSensorBase {
*
* @return Timestamp in seconds since boot.
*/
virtual double ReadFallingTimestamp();
virtual units::second_t ReadFallingTimestamp();
/**
* Set which edge to trigger interrupts on