Repository for import to local machine

Dependencies:   DMBasicGUI DMSupport

Revision:
8:26e49e6955bd
Parent:
6:dba3fbdfd5da
--- a/MethodRampData.cpp	Fri Jul 28 15:53:40 2017 +0000
+++ b/MethodRampData.cpp	Mon Jul 31 15:37:57 2017 +0000
@@ -8,6 +8,9 @@
     MethodRampData - the base, abstract, class.
 */
 
+const GuiConst_INTCOLOR MethodRampData::oddRampEasyGUIColour = 0; // RGB565(0, 0, 0) - black
+const GuiConst_INTCOLOR MethodRampData::evenRampEasyGUIColour = 33808; // RGB565(128, 128, 128) - grey
+
 // Constructor - passed pointers for the USB link to the GC
 MethodRampData::MethodRampData(USBDeviceConnected* newUsbDevice, USBHostGC* newUsbHostGC)
 {
@@ -219,6 +222,14 @@
         easyGUIRampUpperLimitVariable[lineIndex][0] = '\0';
         easyGUIRampUpperTimeVariable[lineIndex][0] = '\0';
     }
+    
+    if((firstRampIndex & 1) == 0) { // First ramp has an even number - so it appears on an odd-numbered row on the easyGUI page
+        *easyGUIMethodRampOddRowsColour = oddRampEasyGUIColour;
+        *easyGUIMethodRampEvenRowsColour = evenRampEasyGUIColour;
+    } else {
+        *easyGUIMethodRampOddRowsColour = evenRampEasyGUIColour;
+        *easyGUIMethodRampEvenRowsColour = oddRampEasyGUIColour;
+    }
 
     needToUpdateEasyGUIMethodPageRampVariables = false;
 }
@@ -278,6 +289,9 @@
     strcpy(easyGUIRampRateSprintfFormat, "%.0f"); // degrees C per minute - a whole number
     strcpy(easyGUIRampUpperLimitSprintfFormat, "%.0f"); // degrees C - a whole number
     strcpy(easyGUIRampUpperTimeSprintfFormat, "%.1f"); // In minutes, but in "units" of 0.1 minute
+    
+    easyGUIMethodRampOddRowsColour = &GuiVar_columnMethodRampOddRowsColour;
+    easyGUIMethodRampEvenRowsColour = &GuiVar_columnMethodRampEvenRowsColour;
 }
 
 float ColumnMethodRampData::GetRampRateFromGC(unsigned int rampIndex)
@@ -341,6 +355,9 @@
     strcpy(easyGUIRampRateSprintfFormat, "%.0f"); // degrees C per minute - a whole number
     strcpy(easyGUIRampUpperLimitSprintfFormat, "%.0f"); // degrees C - a whole number
     strcpy(easyGUIRampUpperTimeSprintfFormat, "%.1f"); // In minutes, but in "units" of 0.1 minute
+    
+    easyGUIMethodRampOddRowsColour = &GuiVar_injectorMethodRampOddRowsColour;
+    easyGUIMethodRampEvenRowsColour = &GuiVar_injectorMethodRampEvenRowsColour;
 }
 
 float InjectorMethodRampData::GetRampRateFromGC(unsigned int rampIndex)
@@ -404,6 +421,9 @@
     strcpy(easyGUIRampRateSprintfFormat, "%.2f"); // In "units" of 0.01 psi per minute - i.e. 2 decimal places
     strcpy(easyGUIRampUpperLimitSprintfFormat, "%.1f"); // In "units" of 0.1 psi - so 1 decimal place
     strcpy(easyGUIRampUpperTimeSprintfFormat, "%.1f"); // In minutes, but in "units" of 0.1 minute
+    
+    easyGUIMethodRampOddRowsColour = &GuiVar_gasMethodRampOddRowsColour;
+    easyGUIMethodRampEvenRowsColour = &GuiVar_gasMethodRampEvenRowsColour;
 }
 
 float GasMethodRampData::GetRampRateFromGC(unsigned int rampIndex)