Create TSP Server in C++ photonlib (#1516)

Automatically starts a TCP server in C++. Also adds warnings to Python.
This commit is contained in:
Matt
2024-11-01 23:32:38 -07:00
committed by GitHub
parent 75e2498f53
commit fc8ecac376
8 changed files with 82 additions and 4 deletions

View File

@@ -15,9 +15,14 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include <hal/HAL.h>
#include "gtest/gtest.h"
int main(int argc, char** argv) {
HAL_Initialize(500, 0);
::testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
int ret = RUN_ALL_TESTS();
HAL_Shutdown();
return ret;
}

View File

@@ -24,8 +24,6 @@ TEST(TimeSyncProtocolTest, Smoketest) {
using namespace wpi::tsp;
using namespace std::chrono_literals;
HAL_Initialize(500, 0);
TimeSyncServer server{5812};
TimeSyncClient client{"127.0.0.1", 5812, 100ms};