Skip to content

Commit 998cf4f

Browse files
committed
Update to 2023 Phoenix 5 libraries
1 parent 1227d58 commit 998cf4f

File tree

73 files changed

+5696
-425
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+5696
-425
lines changed

CMakeLists.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ PROJECT ( example C CXX )
55

66
cmake_minimum_required(VERSION 3.1)
77

8-
add_definitions(-std=c++11)
8+
add_definitions(-std=c++17)
99

1010
# Set the output folder where your program will be created
1111
set(CMAKE_BINARY_DIR ${CMAKE_SOURCE_DIR}/bin)
@@ -22,15 +22,16 @@ include_directories("${PROJECT_SOURCE_DIR}/include")
2222
add_executable(example ${PROJECT_SOURCE_DIR}/example.cpp)
2323

2424
if (${CMAKE_LIBRARY_ARCHITECTURE} STREQUAL "arm-linux-gnueabihf") # Jetson TK1 / Pi
25-
set(PHOENIX_LIBS_DIR ${CMAKE_SOURCE_DIR}/lib/raspberry)
25+
set(PHOENIX_LIBS_DIR ${CMAKE_SOURCE_DIR}/lib/arm32)
2626
elseif (${CMAKE_LIBRARY_ARCHITECTURE} STREQUAL "aarch64-linux-gnu") # Jetson TX2
27-
set(PHOENIX_LIBS_DIR ${CMAKE_SOURCE_DIR}/lib/jetsontx)
27+
set(PHOENIX_LIBS_DIR ${CMAKE_SOURCE_DIR}/lib/arm64)
2828
else()
2929
set(PHOENIX_LIBS_DIR ${CMAKE_SOURCE_DIR}/lib/x86-64)
3030
endif()
3131

3232
target_link_libraries(example ${PHOENIX_LIBS_DIR}/libCTRE_Phoenix.so)
3333
target_link_libraries(example ${PHOENIX_LIBS_DIR}/libCTRE_PhoenixCCI.so)
34+
target_link_libraries(example ${PHOENIX_LIBS_DIR}/libCTRE_PhoenixTools.so)
3435

3536
target_link_libraries(example Threads::Threads)
3637
target_link_libraries(example ${SDL2_LIBRARIES})

example.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
#define Phoenix_No_WPI // remove WPI dependencies
22
#include "ctre/Phoenix.h"
3-
#include "ctre/phoenix/platform/Platform.h"
3+
#include "ctre/phoenix/platform/Platform.hpp"
44
#include "ctre/phoenix/unmanaged/Unmanaged.h"
5-
#include "ctre/phoenix/cci/Unmanaged_CCI.h"
6-
#include <string>
7-
#include <iostream>
85
#include <chrono>
6+
#include <iostream>
7+
#include <string>
98
#include <thread>
10-
#include <SDL2/SDL.h>
119
#include <unistd.h>
10+
#include <SDL2/SDL.h>
1211

1312
using namespace ctre::phoenix;
1413
using namespace ctre::phoenix::platform;
@@ -57,7 +56,7 @@ int main() {
5756
while (true) {
5857
/* SDL seems somewhat fragile, shut it down and bring it up */
5958
SDL_Quit();
60-
SDL_SetHint(SDL_HINT_NO_SIGNAL_HANDLERS, "1"); //so Ctrl-C still works
59+
SDL_SetHint(SDL_HINT_NO_SIGNAL_HANDLERS, "1"); //so Ctrl-C still works
6160
SDL_Init(SDL_INIT_JOYSTICK);
6261

6362
/* poll for gamepad */

include/ctre/phoenix/Context.h

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/*
2+
* Copyright (C) Cross The Road Electronics.  All rights reserved.
3+
* License information can be found in CTRE_LICENSE.txt
4+
* For support and suggestions contact [email protected] or file
5+
* an issue tracker at https://github.com/CrossTheRoadElec/Phoenix-Releases
6+
*/
7+
#pragma once
8+
9+
typedef enum _Context
10+
{
11+
ContextAPI,
12+
ContextDiagServer,
13+
} Context;

include/ctre/phoenix/PhoenixVersion.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
const int kPhoenixVersion = 0x00051501;
1+
const int kPhoenixVersion = 0x00051E04;

0 commit comments

Comments
 (0)