You are on page 1of 1

/* RangeFinder.

c -- This file defines Some Range Finder stuff and range finder
events.
History
When
Who
-------------- --11/14/16 03:25 mep

What/Why
-------Created

*/
/*
*****************************************************************************/
/*----------------------------- Include Files -----------------------------*/
/* include header files for the framework and this service
*/
#include
#include
#include
#include

"ES_Configure.h"
"ES_Framework.h"
"ES_DeferRecall.h"
"ES_ShortTimer.h"

#include
#include
#include
#include
#include
#include
#include
#include
#include

"inc/hw_memmap.h"
"inc/hw_types.h"
"inc/hw_gpio.h"
"inc/hw_sysctl.h"
"driverlib/sysctl.h"
"driverlib/pin_map.h"
"driverlib/gpio.h"
"driverlib/timer.h"
"driverlib/interrupt.h"

// Define PART_TM4C123GH6PM in project

#include "BITDEFS.h"
#include "SceneSM.h"
#include "ADMulti.h"

bool CheckRangeEvents(void){
//Takes no EventParameters, returns true if an event was posted (11/4/11 jec)
bool ReturnVal = false;
ES_Event RangeEvent;
uint32_t LowBound=1500;
uint32_t ADC[2];
//puts("here");
ADC_MultiRead(ADC); //gets value of rangefinder
if(ADC[1] > LowBound){ //if the state of the plant input line is>100
printf("RANGE %u",ADC[1]);
RangeEvent.EventType=ES_WELCOME;
PostSceneSM(RangeEvent);// with EventParameter of the Current
Time //Where too?
ReturnVal = true;
}
return ReturnVal;
}

You might also like