mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +00:00
[wpilib] Add a few unit overloads (#8231)
Co-authored-by: Sam Carlberg <sam@slfc.dev> Co-authored-by: Joseph Eng <91924258+KangarooKoala@users.noreply.github.com> Co-authored-by: Tyler Veness <calcmogul@gmail.com>
This commit is contained in:
@@ -182,6 +182,10 @@ void Notifier::StartPeriodic(units::second_t period) {
|
||||
UpdateAlarm();
|
||||
}
|
||||
|
||||
void Notifier::StartPeriodic(units::hertz_t frequency) {
|
||||
StartPeriodic(1 / frequency);
|
||||
}
|
||||
|
||||
void Notifier::Stop() {
|
||||
std::scoped_lock lock(m_processMutex);
|
||||
m_periodic = false;
|
||||
|
||||
@@ -91,6 +91,8 @@ TimedRobot::TimedRobot(units::second_t period) : IterativeRobotBase(period) {
|
||||
HALUsageReporting::kFramework_Timed);
|
||||
}
|
||||
|
||||
TimedRobot::TimedRobot(units::hertz_t frequency) : TimedRobot{1 / frequency} {}
|
||||
|
||||
TimedRobot::~TimedRobot() {
|
||||
if (m_notifier != HAL_kInvalidHandle) {
|
||||
int32_t status = 0;
|
||||
|
||||
Reference in New Issue
Block a user