Skip to content

Commit 8dd059e

Browse files
committed
Lesson 20230511
1 parent d10f502 commit 8dd059e

File tree

8 files changed

+300
-28
lines changed

8 files changed

+300
-28
lines changed

CMakeLists.txt

+2
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@ target_compile_definitions(program PUBLIC PROGRAM_MAIN)
9696

9797
add_executable(c-cnc ${SOURCE_DIR}/main/c-cnc.c)
9898
target_link_libraries(c-cnc c-cnc_static m mosquitto)
99+
add_executable(ccnc ${SOURCE_DIR}/main/ccnc.c)
100+
target_link_libraries(ccnc c-cnc_static m mosquitto)
99101

100102
# Linking
101103
target_link_libraries(hello c-cnc_lib mosquitto)

machine.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[C-CNC]
22
# Maximum acceleration
3-
A = 10.0
3+
A = 100.0
44
# Maximum permittible position error
55
max_error = 0.005
66
# Sampling time

src/defines.h.in

+7
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,13 @@
2121
// COMMON TYPES
2222
typedef double data_t;
2323

24+
#ifdef SYSLOG
25+
#include <syslog.h>
26+
#else
27+
#define openlog(...) {}
28+
#define syslog(...) {}
29+
#endif
30+
2431

2532
// COMMON INLINE FUNCTIONS
2633

0 commit comments

Comments
 (0)