Make motion::QueueEmpty inline for non-UNITTEST builds

pull/112/head
D.R.racer 2021-08-27 10:35:52 +02:00 committed by DRracer
parent 712b67beb4
commit 1d884d9099
3 changed files with 10 additions and 5 deletions

View File

@ -62,10 +62,6 @@ bool Motion::QueueEmpty() const {
return true;
}
bool Motion::QueueEmpty(config::Axis axis) const {
return axisData[axis].ctrl.QueueEmpty();
}
void Motion::AbortPlannedMoves(bool halt) {
for (uint8_t i = 0; i != NUM_AXIS; ++i)
axisData[i].ctrl.AbortPlannedMoves(halt);

View File

@ -239,7 +239,14 @@ public:
/// @returns true if all planned moves have been finished for one axis
/// @param axis requested
bool QueueEmpty(Axis axis) const;
bool QueueEmpty(Axis axis) const
#ifndef UNITTEST
{
return axisData[axis].ctrl.QueueEmpty();
}
#else
;
#endif
/// @returns false if new moves can still be planned for one axis
/// @param axis axis requested

View File

@ -1,6 +1,8 @@
# first, let's create a symbolic target for all tests
add_custom_target(tests)
add_compile_definitions(UNITTEST)
# include catch_discover_tests function from Catch2
include(${Catch2_SOURCE_DIR}/contrib/Catch.cmake)