1
0
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:
2022-03-15 13:05:11 -05:00
parent 33219ee9d6
commit e2537efb3f
9 changed files with 25 additions and 21 deletions

View File

@@ -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

View File

@@ -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));