diff --git a/simulation/halsim_gazebo/src/main/native/cpp/GazeboAnalogIn.cpp b/simulation/halsim_gazebo/src/main/native/cpp/GazeboAnalogIn.cpp index 60700c23af..30319c93e2 100644 --- a/simulation/halsim_gazebo/src/main/native/cpp/GazeboAnalogIn.cpp +++ b/simulation/halsim_gazebo/src/main/native/cpp/GazeboAnalogIn.cpp @@ -1,5 +1,5 @@ /*----------------------------------------------------------------------------*/ -/* Copyright (c) 2014-2018 FIRST. All Rights Reserved. */ +/* Copyright (c) 2014-2019 FIRST. All Rights Reserved. */ /* Open Source Software - may be modified and shared by FRC teams. The code */ /* must be accompanied by the FIRST BSD license file in the root directory of */ /* the project. */ @@ -10,8 +10,8 @@ #include #include +#include #include -#include #include static void init_callback(const char* name, void* param, diff --git a/simulation/halsim_gazebo/src/main/native/cpp/GazeboDIO.cpp b/simulation/halsim_gazebo/src/main/native/cpp/GazeboDIO.cpp index 02f8387919..d0c190ec03 100644 --- a/simulation/halsim_gazebo/src/main/native/cpp/GazeboDIO.cpp +++ b/simulation/halsim_gazebo/src/main/native/cpp/GazeboDIO.cpp @@ -1,5 +1,5 @@ /*----------------------------------------------------------------------------*/ -/* Copyright (c) 2014-2018 FIRST. All Rights Reserved. */ +/* Copyright (c) 2014-2019 FIRST. All Rights Reserved. */ /* Open Source Software - may be modified and shared by FRC teams. The code */ /* must be accompanied by the FIRST BSD license file in the root directory of */ /* the project. */ @@ -9,8 +9,8 @@ #include +#include #include -#include #include static void init_callback(const char* name, void* param, diff --git a/simulation/halsim_gazebo/src/main/native/cpp/GazeboEncoder.cpp b/simulation/halsim_gazebo/src/main/native/cpp/GazeboEncoder.cpp index 778df7a4a2..bb5894dae3 100644 --- a/simulation/halsim_gazebo/src/main/native/cpp/GazeboEncoder.cpp +++ b/simulation/halsim_gazebo/src/main/native/cpp/GazeboEncoder.cpp @@ -1,5 +1,5 @@ /*----------------------------------------------------------------------------*/ -/* Copyright (c) 2014-2018 FIRST. All Rights Reserved. */ +/* Copyright (c) 2014-2019 FIRST. All Rights Reserved. */ /* Open Source Software - may be modified and shared by FRC teams. The code */ /* must be accompanied by the FIRST BSD license file in the root directory of */ /* the project. */ @@ -9,8 +9,8 @@ #include +#include #include -#include #include static void encoder_init_callback(const char* name, void* param, @@ -54,7 +54,7 @@ void GazeboEncoder::Control(const char* command) { if (!m_pub) { m_pub = m_halsim->node.Advertise( "~/simulator/encoder/dio/" + - std::to_string(HALSIM_GetDigitalChannelA(m_index)) + "/control"); + std::to_string(HALSIM_GetEncoderDigitalChannelA(m_index)) + "/control"); m_pub->WaitForConnection(gazebo::common::Time(1, 0)); } gazebo::msgs::String msg; @@ -66,7 +66,8 @@ void GazeboEncoder::Listen() { if (!m_sub) m_sub = m_halsim->node.Subscribe( "~/simulator/encoder/dio/" + - std::to_string(HALSIM_GetDigitalChannelA(m_index)) + "/position", + std::to_string(HALSIM_GetEncoderDigitalChannelA(m_index)) + + "/position", &GazeboEncoder::Callback, this); } diff --git a/simulation/halsim_gazebo/src/main/native/cpp/GazeboPCM.cpp b/simulation/halsim_gazebo/src/main/native/cpp/GazeboPCM.cpp index de4188c0bb..0f0a44e69f 100644 --- a/simulation/halsim_gazebo/src/main/native/cpp/GazeboPCM.cpp +++ b/simulation/halsim_gazebo/src/main/native/cpp/GazeboPCM.cpp @@ -1,5 +1,5 @@ /*----------------------------------------------------------------------------*/ -/* Copyright (c) 2014-2018 FIRST. All Rights Reserved. */ +/* Copyright (c) 2014-2019 FIRST. All Rights Reserved. */ /* Open Source Software - may be modified and shared by FRC teams. The code */ /* must be accompanied by the FIRST BSD license file in the root directory of */ /* the project. */ @@ -9,7 +9,7 @@ #include -#include +#include #include #include diff --git a/simulation/halsim_gazebo/src/main/native/cpp/GazeboPWM.cpp b/simulation/halsim_gazebo/src/main/native/cpp/GazeboPWM.cpp index 1d07832620..3e01e1d10d 100644 --- a/simulation/halsim_gazebo/src/main/native/cpp/GazeboPWM.cpp +++ b/simulation/halsim_gazebo/src/main/native/cpp/GazeboPWM.cpp @@ -1,5 +1,5 @@ /*----------------------------------------------------------------------------*/ -/* Copyright (c) 2014-2018 FIRST. All Rights Reserved. */ +/* Copyright (c) 2014-2019 FIRST. All Rights Reserved. */ /* Open Source Software - may be modified and shared by FRC teams. The code */ /* must be accompanied by the FIRST BSD license file in the root directory of */ /* the project. */ @@ -9,7 +9,7 @@ #include -#include +#include #include #include