![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
slave integrated
Fork of BAE_FRDMTESIN2 by
Diff: fault.cpp
- Revision:
- 4:8f6c24eca109
- Parent:
- 3:02b45de29c0f
- Child:
- 5:255b43e8e21a
--- a/fault.cpp Wed Dec 03 06:25:50 2014 +0000 +++ b/fault.cpp Wed Dec 03 11:23:37 2014 +0000 @@ -23,7 +23,11 @@ BusOut clear(FAULT_CLEAR1,FAULT_CLEAR2,FAULT_CLEAR3,FAULT_CLEAR4,FAULT_CLEAR5,FAULT_CLEAR6,FAULT_CLEAR7,FAULT_CLEAR8); +BusOut MODE(ACS,TX,PAYLOAD); extern SensorData Sensor; +//char flag; +extern beacon_sc; + void FAULTS() { @@ -40,4 +44,31 @@ Sensor.fault = clear; printf(" %d \n",Sensor.fault); -} \ No newline at end of file +} + +void POWER(char flag) +{ + printf("Entered Power Management \n"); + printf("Entering mode %c \n", flag); + switch (flag) + { + case '1': ACTIVE = 7; + break; + case '2': ACTIVE = 6; + break; + case '3': ACTIVE = 5; + break; + case '4': ACTIVE = 4; + break; + case '5': ACTIVE = 2; + break; + case '6': ACTIVE = 0; + break; + case '7': ACTIVE = 0; + break; + } + if (flag == 7) + beacon_sc = 30; + else + beacon_sc = 3; +} \ No newline at end of file