mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-22 01:11:42 +00:00
Squashed commit of the following:
commit a3ccfab0a42414aa169792356bfc47ee8d0d2d7b Author: Kevin O'Connor <koconnor@usfirst.org> Date: Tue Sep 23 13:56:59 2014 -0400 Implement zero latch (used to reduce brownout latency) in Java Change-Id: I3bf4ffbf20cf3d8a42da4fa1755b4306c49ede34 commit 0af37dfcc0d1172974519c44126973c302385d55 Author: Kevin O'Connor <koconnor@usfirst.org> Date: Tue Sep 23 13:03:07 2014 -0400 Implement zero latch (used to improve brownout latency) in C++ Change-Id: I62bedd1af65d367c32e2ab0b5a4fc679776eecb5 Change-Id: Ic27f37a9ab45aad82c1f7154d4edfbccfaa19229
This commit is contained in:
@@ -352,6 +352,16 @@ void PWM::SetPeriodMultiplier(PeriodMultiplier mult)
|
||||
wpi_setErrorWithContext(status, getHALErrorMessage(status));
|
||||
}
|
||||
|
||||
void PWM::SetZeroLatch()
|
||||
{
|
||||
if (StatusIsFatal()) return;
|
||||
|
||||
int32_t status = 0;
|
||||
|
||||
latchPWMZero(m_pwm_ports[m_channel], &status);
|
||||
wpi_setErrorWithContext(status, getHALErrorMessage(status));
|
||||
}
|
||||
|
||||
|
||||
void PWM::ValueChanged(ITable* source, const std::string& key, EntryValue value, bool isNew) {
|
||||
SetSpeed(value.f);
|
||||
|
||||
Reference in New Issue
Block a user