mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +00:00
[hal] Fixes for making PWM drive (#7528)
* Increase connection timeout, fix ld path, properly initialize smart io. * Also fix HAL_GetSystemTimeValid, so DataLogManager doesn't throw errors.
This commit is contained in:
@@ -43,7 +43,7 @@ int32_t SmartIo::InitializeMode(SmartIoMode mode) {
|
||||
inst.GetDoubleTopic("/io/valset" + channelString).Publish(options);
|
||||
setPublisher.Set(0);
|
||||
pwmMinPublisher =
|
||||
inst.GetDoubleTopic("/io/pwmmim" + channelString).Publish();
|
||||
inst.GetDoubleTopic("/io/pwmmin" + channelString).Publish();
|
||||
pwmMinPublisher.Set(0);
|
||||
pwmMaxPublisher =
|
||||
inst.GetDoubleTopic("/io/pwmmax" + channelString).Publish();
|
||||
@@ -63,8 +63,8 @@ int32_t SmartIo::SetPwmMicroseconds(uint16_t microseconds) {
|
||||
|
||||
// TODO(thad) add support for always on signal
|
||||
|
||||
if (microseconds > 4096) {
|
||||
microseconds = 4096;
|
||||
if (microseconds > 4095) {
|
||||
microseconds = 4095;
|
||||
}
|
||||
|
||||
// Scale from 0-4096 to 0.0-2.0, then to -1.0-1.0
|
||||
|
||||
Reference in New Issue
Block a user