Skip to content

Conversation

@clacassa
Copy link
Collaborator

@clacassa clacassa commented Sep 22, 2024

It's just about redefining what we consider a library or not in our source files. I don't think creating a static library for each single cxx file is a good idea. Static libraries are meant to regroup several files that share one purpose. So I grouped each module into a library, and like that no need to relink each single "atomic" lib to a test executable. If a test file uses adxl375.cpp, just link with libadxl375.

@clacassa clacassa requested a review from marinPh September 22, 2024 15:50
Copy link
Member

@marinPh marinPh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR tackles the issue of our long building time, the code has compiled through tests and can now be merged

Comment on lines 1 to 9
set(LORA_SOURCES src/LoRa.cpp
src/itoa.cpp
src/LoopbackStream.cpp
src/Print.cpp
src/Stream.cpp
src/WString.cpp)
add_library(LoRa4Raspi ${LORA_SOURCES})
target_include_directories(LoRa4Raspi PUBLIC include)
target_link_libraries(LoRa4Raspi PUBLIC pigpio)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

much better use of library creation

Copy link
Member

@marinPh marinPh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good changes ready to merge

Comment on lines +10 to +20
set(FIREHORN_FC_SOURCES
${DATA_DIR}/data.cpp
${DATA_DIR}/data.h
${DATA_DIR}/sensors.cpp
${DATA_DIR}/sensors.h
${DATA_DIR}/telecom.cpp
${DATA_DIR}/telecom.h

${FLIGHT_CONTROL_DIR}/av_state.cpp
${FLIGHT_CONTROL_DIR}/av_state.h
${FLIGHT_CONTROL_DIR}/thresholds.h
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thats a much more efficient way of compiling the FC

@clacassa clacassa merged commit cefffb1 into main Oct 4, 2024
2 checks passed
@clacassa clacassa deleted the Reorganise-LoRa-libs branch October 4, 2024 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants