The field version of the solarnano grid on the ionQubes
Fork of SolarNanoGridv3 by
Diff: Locker/Locker.h
- Revision:
- 11:87ab310924f0
- Parent:
- 10:30c9e8df0032
- Child:
- 13:de43f28c0365
--- a/Locker/Locker.h Fri Jun 03 14:55:12 2016 +0000 +++ b/Locker/Locker.h Wed Jun 08 22:12:52 2016 +0000 @@ -62,7 +62,7 @@ // ********************* // Constructor: - Locker(FILE* fp); + Locker(FILE* fp, Serial *pc); // Main loop function: void loop(void); @@ -98,25 +98,30 @@ /** * Array of battery states */ - char* battIn; // array of all battery states - char* battPipes; // array of RX pipes - char* dirNames[4]; - char* fileNames[4]; - unsigned int lengthFile[4]; + char* battIn; /**< array of all battery states */ + char* battPipes; /**< array of RX pipes */ + char* dirNames[4]; /**< The directory for each pipe */ + char* fileNames[4]; /**< The filename of each pipe */ + unsigned int lengthFile[4]; /**< The file length of each pipe */ char* temp; - char* sdBuffer; - unsigned int sdBuffPnt; - int battQP; // Battery queue pointer - int pipeQP; // pipe q pointer (Add 2) - int pipe; - int width; + char* sdBuffer; /**< The ram buffer for the SD card- large! */ + unsigned int sdBuffPnt; /**< SD buffer pointer */ + int battQP; /**< Battery queue pointer */ + int pipeQP; /**< pipe queue pointer; add 2 to get pipe */ + int pipe; /**< The pipe that has last received data */ + int width; /**< The number of bytes of received data */ + int userIDDrop; /**< User ID of drop off from HMI*/ + int numBatDrop; /**< Num bat dropped off*/ char *timeValue; + DigitalOut *pods[16]; /**< Array of gpio to control the pod relays */ volatile time_t now; volatile time_t lastRxTme; - // flags + // ********************* + // * Protected flags: * + // ********************* volatile bool flagRotate; volatile char flagNrf; volatile char flagOneSecond; @@ -163,16 +168,20 @@ */ void flushSDBuffer(int p); - /** - * Set NRF as RX - */ - void setAsRX(); +// /** +// * Set NRF as RX +// */ +// void setAsRX(); +// +// /** +// * Set NRF as TX +// */ +// void setAsTX(); /** - * Set NRF as TX + * Turns a pod power on */ - void setAsTX(); - + void turnPodOn(int pod, int on); private: // **********************