Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ endif(JUNO_API)


# Create the library (update the source files as needed)
aux_source_directory(${juno_SOURCE_DIR}/src JUNO_SRCS)
aux_source_directory(${PROJECT_SOURCE_DIR}/src JUNO_SRCS)
add_library(${PROJECT_NAME} STATIC
${JUNO_SRCS}
)
target_include_directories(${PROJECT_NAME} PUBLIC
$<BUILD_INTERFACE:${juno_SOURCE_DIR}/include>
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_PREFIX}/include>
)

Expand Down Expand Up @@ -80,10 +80,10 @@ endforeach()
# Specify the include directories for consumers of this library
foreach(lib ${JUNO_LIBS})
target_include_directories(${lib} PUBLIC
$<BUILD_INTERFACE:${juno_SOURCE_DIR}/include>
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_PREFIX}/include>
PRIVATE
${juno_SOURCE_DIR}/src
${PROJECT_SOURCE_DIR}/src
)
# Enable a comprehensive set of warnings
target_compile_options(${lib} PRIVATE
Expand All @@ -102,7 +102,7 @@ if(JUNO_SHARED)
set(JUNO_SHARED_TARGET ${PROJECT_NAME}_shared)
add_library(${JUNO_SHARED_TARGET} SHARED ${JUNO_SRCS})
target_include_directories(${JUNO_SHARED_TARGET} PUBLIC
$<BUILD_INTERFACE:${juno_SOURCE_DIR}/include>
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_PREFIX}/include>
)
endif()
Expand All @@ -115,7 +115,7 @@ install(
)

install(
DIRECTORY ${juno_SOURCE_DIR}/include/ # source directory
DIRECTORY ${PROJECT_SOURCE_DIR}/include/ # source directory
DESTINATION ${CMAKE_INSTALL_PREFIX}/include # usually “include/juno”
FILES_MATCHING PATTERN "*.h" # only headers
)
Expand All @@ -124,9 +124,9 @@ if(JUNO_TESTS)
add_definitions(-DUNITY_INCLUDE_DOUBLE)
set(CMAKE_BUILD_TYPE Debug)
enable_testing()
add_library(unity ${juno_SOURCE_DIR}/deps/unity/src/unity.c)
target_include_directories(unity PUBLIC ${juno_SOURCE_DIR}/deps/unity/src)
add_subdirectory(${juno_SOURCE_DIR}/tests)
add_library(unity ${PROJECT_SOURCE_DIR}/deps/unity/src/unity.c)
target_include_directories(unity PUBLIC ${PROJECT_SOURCE_DIR}/deps/unity/src)
add_subdirectory(${PROJECT_SOURCE_DIR}/tests)
endif()


Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* LibJuno is a lightweight C99 library designed specifically for embedded systems.
* LibJuno enables embedded systems developers to utilize dependency injection within
C99 in a memory-safe manner
* LibJuno provides essential functionalities like memory management, data structures, string operations and more all without dynamic memory allocation!
* LibJuno provides essential functionalities like memory management and more all without dynamic memory allocation!
* LibJuno optimizes for memory safety, determinism and efficiency in constrained environments.
* LibJuno is compiled without the standard library to maximize portability.

Expand Down
41 changes: 41 additions & 0 deletions include/juno/math/juno_dyn_types.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#ifndef JUNO_DYN_TYPES_H
#define JUNO_DYN_TYPES_H

#include "juno/module.h"
#include "juno/status.h"
#include "juno/time/time_api.h"
#include "juno_vec_types.h"
#ifdef __cplusplus
extern "C" {
#endif

typedef struct JUNO_KSTATE_F64_TAG
{
JUNO_TIMESTAMP_T tTime;
JUNO_VEC3_F64_T pos;
JUNO_VEC3_F64_T vel;
JUNO_VEC3_F64_T accel;
JUNO_VEC3_F64_T w;
JUNO_RQUAT_F64_T att;
} JUNO_KSTATE_F64_T;

JUNO_MODULE_RESULT(JUNO_KSTATE_F64_RESULT_T, JUNO_KSTATE_F64_T);

typedef union JUNO_KMAT_TAG JUNO_KMAT_T;
typedef struct JUNO_KMAT_API_TAG JUNO_KMAT_API_T;

typedef struct JUNO_KMAT_ROOT_TAG JUNO_MODULE_ROOT(JUNO_KMAT_API_T,
JUNO_TIME_T *ptTime;
JUNO_KSTATE_F64_T tState;
)JUNO_KMAT_ROOT_T;

struct JUNO_KMAT_API_TAG
{
/// Update the state of the kinematic system
JUNO_STATUS_T (*UpdateWithDeltas)(JUNO_KMAT_T *ptKmat, JUNO_VEC3_F64_T dVel, JUNO_VEC3_F64_T dAng, JUNO_TIMESTAMP_T tTimestamp);
};

#ifdef __cplusplus
}
#endif
#endif
Loading
Loading