diff --git a/developerRobot/build.gradle b/developerRobot/build.gradle index 1060b8a2d19..b09ba35856d 100644 --- a/developerRobot/build.gradle +++ b/developerRobot/build.gradle @@ -79,6 +79,8 @@ deploy { } } + timeout = 7 + def remote = it artifacts { @@ -95,7 +97,7 @@ deploy { excludes.add('**/*.so.debug') excludes.add('**/*.so.*.debug') postdeploy << { ctx -> - ctx.execute("echo '/home/systemcore/developerRobotCpp' > /home/systemcore/robotCommand") + ctx.execute("echo 'LD_LIBRARY_PATH=/home/systemcore/frc/third-party/lib /home/systemcore/developerRobotCpp' > /home/systemcore/robotCommand") ctx.execute("chmod +x /home/systemcore/robotCommand; chown systemcore /home/systemcore/robotCommand") ctx.execute("setcap cap_sys_nice+eip \"/home/systemcore/developerRobotCpp\"") ctx.execute('chmod +x developerRobotCpp') @@ -105,7 +107,7 @@ deploy { developerRobotCppStatic(NativeExecutableArtifact) { libraryDirectory = '/home/systemcore/frc/third-party/lib' postdeploy << { ctx -> - ctx.execute("echo '/home/systemcore/developerRobotCppStatic' > /home/systemcore/robotCommand") + ctx.execute("echo ''LD_LIBRARY_PATH=/home/systemcore/frc/third-party/lib /home/systemcore/developerRobotCppStatic' > /home/systemcore/robotCommand") ctx.execute("chmod +x /home/systemcore/robotCommand; chown systemcore /home/systemcore/robotCommand") ctx.execute("sudo setcap cap_sys_nice+eip \"/home/systemcore/developerRobotCppStatic\"") ctx.execute('chmod +x developerRobotCppStatic') diff --git a/hal/src/main/native/systemcore/HAL.cpp b/hal/src/main/native/systemcore/HAL.cpp index 2d043120921..32dfaea2fed 100644 --- a/hal/src/main/native/systemcore/HAL.cpp +++ b/hal/src/main/native/systemcore/HAL.cpp @@ -77,6 +77,7 @@ void InitializeHAL() { InitializePWM(); InitializeRelay(); InitializeSerialPort(); + InitializeSmartIo(); InitializeSPI(); InitializeThreads(); } @@ -311,7 +312,6 @@ HAL_Bool HAL_GetRSLState(int32_t* status) { } HAL_Bool HAL_GetSystemTimeValid(int32_t* status) { - *status = HAL_HANDLE_ERROR; return false; } diff --git a/hal/src/main/native/systemcore/HALInitializer.h b/hal/src/main/native/systemcore/HALInitializer.h index 20b9a8bff08..eab0fe8018a 100644 --- a/hal/src/main/native/systemcore/HALInitializer.h +++ b/hal/src/main/native/systemcore/HALInitializer.h @@ -50,6 +50,7 @@ extern void InitializePower(); extern void InitializePWM(); extern void InitializeRelay(); extern void InitializeSerialPort(); +extern void InitializeSmartIo(); extern void InitializeSPI(); extern void InitializeThreads(); } // namespace hal::init diff --git a/hal/src/main/native/systemcore/SmartIo.cpp b/hal/src/main/native/systemcore/SmartIo.cpp index 9a3da55b122..73244432832 100644 --- a/hal/src/main/native/systemcore/SmartIo.cpp +++ b/hal/src/main/native/systemcore/SmartIo.cpp @@ -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