Sensos Module Updated
Fork of Middleware by
Revision 4:c59485faea9f, committed 2015-12-10
- Comitter:
- Jorge_Beltran
- Date:
- Thu Dec 10 03:03:11 2015 +0000
- Parent:
- 3:1704050210b5
- Commit message:
- Updated Sensors Module Added GetLightFuncion
Changed in this revision
Sensors.cpp | Show annotated file Show diff for this revision Revisions of this file |
Sensors.h | Show annotated file Show diff for this revision Revisions of this file |
diff -r 1704050210b5 -r c59485faea9f Sensors.cpp --- a/Sensors.cpp Thu Dec 10 02:31:36 2015 +0000 +++ b/Sensors.cpp Thu Dec 10 03:03:11 2015 +0000 @@ -174,3 +174,15 @@ return PersonNumber; } + +//LIGHT FEEDBACK FUNCION +bool GetLightStatus(){ + static bool LightFeedback = OFF; + + if(LIGHTSTATUS == ON) + LightFeedback = ON; + else + LightFeedback = OFF; + + return LightFeedback; +}
diff -r 1704050210b5 -r c59485faea9f Sensors.h --- a/Sensors.h Thu Dec 10 02:31:36 2015 +0000 +++ b/Sensors.h Thu Dec 10 03:03:11 2015 +0000 @@ -32,6 +32,10 @@ //START LIGHT CONTROL OUTPUT static DigitalOut LightControl(D6); //END LIGHT CONTROL OUTPUT +//START LIGHT FEEDBACK INPUT +static DigitalIn LIGHTSTATUS(D8); +//END LIGHT FEEDBACK INPUT + /*Extern Functions*/ //////////////////////////////////////////////////// @@ -78,4 +82,13 @@ Output parameters -> unsigned int PersonNumber; 0 - 4294967296. */ +//////////////////////////////////////////////////// +extern bool GetLightStatus(); +/* GetLightStatus: +Input parameters -> void + +Output parameters -> bool LightFeedback; 0-> Light is OFF + 1-> Light is ON +*/ + #endif \ No newline at end of file