From 69f496ba08ff63567a5707fb9ffa2a42b6e3b289 Mon Sep 17 00:00:00 2001 From: dragonprevost Date: Mon, 22 Oct 2018 18:14:10 -0700 Subject: fixed camelCase variable names --- motionMonitor/motionMonitor.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/motionMonitor/motionMonitor.c b/motionMonitor/motionMonitor.c index 0e2fbe5..d71d91b 100644 --- a/motionMonitor/motionMonitor.c +++ b/motionMonitor/motionMonitor.c @@ -31,8 +31,8 @@ static const double impactThreshold = 20.0; Acceleration suddenImpact = {0, 0, 0}; -pthread_t impact_thread; -sem_t impact_mutex; +pthread_t impactThread; +sem_t impactMutex; /* @@ -127,9 +127,9 @@ void *impactMonitor(void * ptr){ if(euclidian > impactThreshold){ LE_INFO("euclidian : %f", euclidian); //3. add x, y, z to impact array - sem_wait(&impact_mutex); + sem_wait(&impactMutex); recordImpact(&x, &y, &z); - sem_post(&impact_mutex); + sem_post(&impactMutex); } usleep(100*1000); @@ -143,8 +143,8 @@ void *impactMonitor(void * ptr){ void initThread(){ int thread, mutx; - thread = pthread_create( &impact_thread, NULL, impactMonitor, NULL); - mutx = sem_init(&impact_mutex, 0, 1); + thread = pthread_create( &impactThread, NULL, impactMonitor, NULL); + mutx = sem_init(&impactMutex, 0, 1); if(thread && mutx){ LE_INFO("Reader Thread Created"); -- cgit v1.2.3