uses pushing box to publish to google spreadsheets with a state machine instead of a while loop

Fork of GSM_Library by DCS_TEAM

Revision:
32:424896b5adbe
Parent:
31:a1e9fd23eb6a
--- a/GSMLibrary.h	Tue Apr 28 03:03:19 2015 +0000
+++ b/GSMLibrary.h	Wed Oct 21 19:44:15 2015 +0000
@@ -9,15 +9,12 @@
 #define SMS_ESCAPE_CHAR "\x1A"  //Character that can be appended to end of text message to abort sending it
 
 enum gsm_states{GSM_INITIALIZE, 
-                    GSM_AT_OK,      //Make sure communication is established with GSM
-                    GSM_AT_CSQ,     //Check signal strength
-                    GSM_AT_CREG,    //Check if phone is connected to network
-                    GSM_AT_CNMI,    //Turn off incoming SMS notifications
-                    GSM_AT_CMGF,    //Change to text message mode
-                    GSM_READ_MSG,   //Check for new messages.
-                    GSM_AT_CMGS,    //Input phone number and indicate beginning of SMS message body
-                    GSM_AT_SENDSMS, //Write message, finish with SMS_END_CHAR
-                    GSM_DEL_R_MSGS  //Delete unread messages (if present)   
+                    GSM_CHECK_SIM,  //Send initial AT Command and Check SIM Card Status
+                    GSM_JOIN,       //Join the wireless network
+                    GSM_SERVER_IP,  //Get the IP Address for the server
+                    GSM_CONNECT,    //Connect to the server via tcp on specified port
+                    GSM_SEND,       //Send data to server via tcp 
+                    GSM_WAIT        //State to wait between successive data sent to the server 
                 };
 
 //GSM state machine
@@ -25,7 +22,6 @@
 bool gsm_timeOut();
 void gsm_printState();
 void gsm_nextStateLogic();
-void gsm_mealyOutputs();
 
 //Initialize DMA data transfer, and UART3.
 void gsm_initialize();
@@ -34,7 +30,7 @@
 bool gsm_ready();
 
 //Have the GSM send data - L = long, S = short, hh/mm/ss for time, "lat ns" for latitute, "lon we" for longitude
-void gsm_send_data(float L, float Lref, float S, float Sref, int hh, int mm, int ss, float lat, char ns, float lon, char we);
+void gsm_send_data(float L, float Lref, int hh, int mm, int ss, float lat, char ns,  float lon, char we);
 
 //Brings state machine back to initialize state (notice this is a bit different than the initialize function)
 //This will set flags to their initial values and prepare gsm to start anew.