mirror of
https://github.com/CPunch/Laika.git
synced 2025-11-14 16:50:06 +00:00
Added LAIKA_CNC_IP & LAIKA_CNC_PORT to cmake config
This commit is contained in:
@@ -11,7 +11,6 @@ set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
||||
file(GLOB_RECURSE CNCSOURCE ${CMAKE_CURRENT_SOURCE_DIR}/src/**.c)
|
||||
file(GLOB_RECURSE CNCHEADERS ${CMAKE_CURRENT_SOURCE_DIR}/include/**.h)
|
||||
add_executable(LaikaCNC ${CNCSOURCE} ${CNCHEADERS})
|
||||
set_property(TARGET LaikaCNC PROPERTY C_STANDARD 11)
|
||||
target_link_libraries(LaikaCNC PUBLIC LaikaLib)
|
||||
|
||||
# add the 'DEBUG' preprocessor definition if we're compiling as Debug
|
||||
|
||||
@@ -5,25 +5,10 @@
|
||||
|
||||
struct sLaika_taskService tService;
|
||||
|
||||
/*void debugTask1(struct sLaika_taskService *service, struct sLaika_task *task, clock_t currTick, void *uData) {
|
||||
printf("hello 1 !\n");
|
||||
}
|
||||
|
||||
void debugTask2(struct sLaika_taskService *service, struct sLaika_task *task, clock_t currTick, void *uData) {
|
||||
printf("hello 2 !\n");
|
||||
}
|
||||
|
||||
void debugTask3(struct sLaika_taskService *service, struct sLaika_task *task, clock_t currTick, void *uData) {
|
||||
printf("hello 3 !\n");
|
||||
}*/
|
||||
|
||||
int main(int argv, char **argc) {
|
||||
struct sLaika_cnc *cnc = laikaC_newCNC(13337);
|
||||
struct sLaika_cnc *cnc = laikaC_newCNC(atoi(LAIKA_CNC_PORT));
|
||||
|
||||
laikaT_initTaskService(&tService);
|
||||
/*laikaT_newTask(&tService, 1000, debugTask1, NULL);
|
||||
laikaT_newTask(&tService, 500, debugTask2, NULL);
|
||||
laikaT_newTask(&tService, 2000, debugTask3, NULL);*/
|
||||
|
||||
while (true) {
|
||||
laikaC_pollPeers(cnc, laikaT_timeTillTask(&tService));
|
||||
|
||||
Reference in New Issue
Block a user