Compare commits
2 commits
2443e553c8
...
cb0e33c175
Author | SHA1 | Date | |
---|---|---|---|
QuentinPerret | cb0e33c175 | ||
QuentinPerret | ab1a87c6ac |
|
@ -1,3 +1,4 @@
|
|||
|
||||
cmake_minimum_required(VERSION 2.8)
|
||||
project(Traitement-signal-plantes C)
|
||||
|
||||
|
@ -13,9 +14,8 @@ set (CMAKE_RUNTIME_OUTPUT_DIRECTORY Executable) #Set Executable directory as def
|
|||
add_executable(exect fileGestion.c getArray.c average.c growthRate.c power.c queue.c simulateFlux.c database.c main.c)
|
||||
# add_executable(exect main.c simulateFlux.c queue.c power.c growthRate.c average.c getArray.c fileGestion.c)
|
||||
|
||||
find_package (SQLite3)
|
||||
include_directories(${SQLite3_INCLUDE_DIRS})
|
||||
target_link_libraries (exect ${SQLite3_LIBRARIES} m)
|
||||
find_package(SQLite3 REQUIRED)
|
||||
target_link_libraries(exect ${SQLite3_LIBRARIES} m)
|
||||
|
||||
|
||||
find_package(Threads)
|
||||
|
@ -25,6 +25,7 @@ set(CTEST_MEMORYCHECK_TYPE "AddressSanitizer")
|
|||
set(CTEST_MEMORYCHECK_SANITIZER_OPTIONS "verbosity=1:symbolize=1:abort_on_error=1:detect_leaks=1")
|
||||
|
||||
add_executable(ctest fileGestion.c getArray.c average.c growthRate.c queue.c simulateFlux.c database.c ctest.c)
|
||||
target_link_libraries(ctest ${SQLite3_LIBRARIES} m)
|
||||
target_link_libraries(ctest ${CMAKE_THREAD_LIBS_INIT} m)
|
||||
|
||||
add_test(test_queueCreateEmpty ./ctest queueCreateEmpty)
|
||||
|
|
|
@ -240,7 +240,7 @@ int initiaizeNewTrial(char *position, double frequency, bool *captorOneHot)
|
|||
{
|
||||
if (captorOneHot[i])
|
||||
{
|
||||
insertCaptorMetadataElement(i, trialId);
|
||||
insertCaptorMetadataElement(i + 1, trialId);
|
||||
createCaptorDataTable(trialId, i + 1);
|
||||
}
|
||||
}
|
||||
|
|
BIN
Code-C/main
BIN
Code-C/main
Binary file not shown.
|
@ -1,5 +1,6 @@
|
|||
#include <pthread.h>
|
||||
#include <stdbool.h>
|
||||
#include <sqlite3.h>
|
||||
|
||||
#include "./Include/simulateFlux.h"
|
||||
#include "./Include/power.h"
|
||||
|
@ -147,14 +148,6 @@ int main(int argc, char **argv)
|
|||
}
|
||||
printf("%d", nCol);
|
||||
|
||||
for (int i = 0; i < 8; i++)
|
||||
{
|
||||
if (selectionCaptors[i])
|
||||
{
|
||||
nCol++;
|
||||
}
|
||||
}
|
||||
|
||||
rawDataWriteFlag = true;
|
||||
|
||||
period = 1 / freqEch;
|
||||
|
@ -166,19 +159,19 @@ int main(int argc, char **argv)
|
|||
createDb(); // Created the Db if not exist
|
||||
initiaizeNewTrial("test", freqEch, selectionCaptors); // Initialize Trials data and tables
|
||||
|
||||
pthread_t rawData;
|
||||
if (pthread_create(&rawData, NULL, threadSimulateFlux, "threadSimulflux") != 0)
|
||||
{
|
||||
perror("threadSimulflux() error");
|
||||
exit(1);
|
||||
}
|
||||
// pthread_t rawData;
|
||||
// if (pthread_create(&rawData, NULL, threadSimulateFlux, "threadSimulflux") != 0)
|
||||
// {
|
||||
// perror("threadSimulflux() error");
|
||||
// exit(1);
|
||||
// }
|
||||
|
||||
pthread_t calculAverage;
|
||||
if (pthread_create(&calculAverage, NULL, threadCalculAverage, "threadCalculAverage"))
|
||||
{
|
||||
perror("threadCalculAverage() error");
|
||||
exit(1);
|
||||
}
|
||||
// pthread_t calculAverage;
|
||||
// if (pthread_create(&calculAverage, NULL, threadCalculAverage, "threadCalculAverage"))
|
||||
// {
|
||||
// perror("threadCalculAverage() error");
|
||||
// exit(1);
|
||||
// }
|
||||
|
||||
// pthread_t calculGrowthRate;
|
||||
// if (pthread_create(&calculGrowthRate, NULL, threadCalculGrowthRate, "threadCalculGrowthRate"))
|
||||
|
@ -187,7 +180,7 @@ int main(int argc, char **argv)
|
|||
// exit(1);
|
||||
// }
|
||||
|
||||
pthread_exit(NULL);
|
||||
// pthread_exit(NULL);
|
||||
|
||||
sqlite3_shutdown();
|
||||
}
|
BIN
Code-C/robotgowest.db
Normal file
BIN
Code-C/robotgowest.db
Normal file
Binary file not shown.
Loading…
Reference in a new issue