Skip to content

Commit 0cdcbf1

Browse files
committed
update libparams from v0.8.4 to v0.10.0
1 parent c9fb7e5 commit 0cdcbf1

File tree

5 files changed

+20
-7
lines changed

5 files changed

+20
-7
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ ubuntu: clone_dependencies
1919

2020
clone_dependencies:
2121
mkdir -p build
22-
if [ ! -d "${LIBPARAMS_DIR}" ]; then git clone --depth 1 --branch v0.8.4 https://github.com/PonomarevDA/libparams.git ${LIBPARAMS_DIR}; fi
22+
if [ ! -d "${LIBPARAMS_DIR}" ]; then git clone --depth 1 --branch v0.10.0 https://github.com/PonomarevDA/libparams.git ${LIBPARAMS_DIR}; fi
2323

2424
clean:
2525
rm -rf build/examples/

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ The library should support the following platforms:
3838

3939
## Dependencies
4040

41-
- [libparams](https://github.com/PonomarevDA/libparams) v0.8.4 library.
41+
- [libparams](https://github.com/PonomarevDA/libparams) v0.10.0 library.
4242
- [dronecan/libcanard](https://github.com/dronecan/libcanard)
4343

4444
## How to integrate the library into a project
@@ -53,8 +53,8 @@ set(CAN_PLATFORM socketcan)
5353
set(LIBPARAMS_PATH ../../build/libparams)
5454
set(LIBPARAMS_PLATFORM ubuntu)
5555
56-
# 3. Include the CMakeLists.txt
57-
include(../../CMakeLists.txt)
56+
# 3. Include the dronecan.cmake
57+
include(../../dronecan.cmake)
5858
5959
# 4. Add DroneCAN related source files and headers to you target.
6060
add_executable(${EXECUTABLE}

CMakeLists.txt renamed to dronecan.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ include(${CMAKE_CURRENT_LIST_DIR}/platform_specific/${CAN_PLATFORM}/config.cmake
1515
if(NOT DEFINED LIBPARAMS_PATH)
1616
message(SEND_ERROR "LIBPARAMS_PATH is not specified!")
1717
endif()
18-
include(${LIBPARAMS_PATH}/CMakeLists.txt)
18+
include(${LIBPARAMS_PATH}/libparams.cmake)
1919

2020
set(DRONECAN_SOURCES
2121
${DRONECAN_PLATFORM_SOURCES}

examples/ubuntu/CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,11 @@ set(CAN_PLATFORM socketcan)
1515
# 2. Specify path to libparams and platform. Options: stm32f103, stm32g0b1, ubuntu
1616
set(LIBPARAMS_PATH ${ROOT_DIR}/build/external/libparams)
1717
set(LIBPARAMS_PLATFORM ubuntu)
18+
set(LIBPARAMS_PARAMS_DIR="${CMAKE_CURRENT_BINARY_DIR}/params")
19+
add_definitions(-DLIBPARAMS_PARAMS_DIR="${CMAKE_CURRENT_BINARY_DIR}/params")
1820

19-
# 3. Include the CMakeLists.txt
20-
include(${ROOT_DIR}/CMakeLists.txt)
21+
# 3. Include the dronecan.cmake
22+
include(${ROOT_DIR}/dronecan.cmake)
2123

2224
# 4. Add DroneCAN related source files and headers to you target
2325
add_executable(application

examples/ubuntu/params.hpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#include "storage.h"
2+
#ifndef LIBPARAM_PARAMETERS_HPP_
3+
#define LIBPARAM_PARAMETERS_HPP_
4+
5+
enum IntParamsIndexes {
6+
PARAM_UAVCAN_NODE_ID,
7+
INTEGER_PARAMS_AMOUNT
8+
};
9+
#define NUM_OF_STR_PARAMS 2
10+
11+
#endif // LIBPARAM_PARAMETERS_HPP_

0 commit comments

Comments
 (0)