Repository for import to local machine

Dependencies:   DMBasicGUI DMSupport

Revision:
8:26e49e6955bd
Parent:
7:f0e645cf73a2
--- a/GetGCStatusLoop.cpp	Fri Jul 28 15:53:40 2017 +0000
+++ b/GetGCStatusLoop.cpp	Mon Jul 31 15:37:57 2017 +0000
@@ -3462,17 +3462,29 @@
 */
 void GetGCStatusLoop::ShowMethodPageScrollButtons(bool needToScrollRampData)
 {
+#define USE_QSPI_ARROW_BITMAPS    
     if(needToScrollRampData){
         // Hard coded coords obtained - these will need to be changed
         // if we change the layout of the Column Method page in easyGUI
+#ifdef USE_QSPI_ARROW_BITMAPS
+        if(qspiBitmaps != NULL) {
+            qspiBitmaps->DisplayUpArrowBitmap(620, 250);
+            qspiBitmaps->DisplayDownArrowBitmap(620, 350);
+        }
+#else
         GuiLib_ShowBitmap(GuiStruct_Bitmap_UpArrow, 630, 260, -1); // No transparency
         GuiLib_ShowBitmap(GuiStruct_Bitmap_DownArrow, 630, 345, -1);
+#endif
     } else {
         // Blank out the whole area where the scroll buttons appear.
-        // Note that, as always, the first coordinate pair has to be (0, 0)
-        // to display the correct part of the bitmap - not, as one might expect,
-        // the same as the second coordinate pair
+        // Note that, as always, the first coordinate pair in the call to 'GuiLib_ShowBitmapArea' has to be (0, 0)
+        // to display the correct part of the bitmap - not, as one might expect, the same as the second coordinate pair
+#ifdef USE_QSPI_ARROW_BITMAPS
+        GuiLib_ShowBitmapArea(GuiStruct_Bitmap_BlankBackground, 0, 0, 620, 250, 670, 390, -1); // -1 means 'no transparent colour'
+#undef USE_QSPI_ARROW_BITMAPS
+#else
         GuiLib_ShowBitmapArea(GuiStruct_Bitmap_BlankBackground, 0, 0, 630, 250, 670, 390, -1); // -1 means 'no transparent colour'
+#endif
     }
 }
 
@@ -3812,7 +3824,6 @@
     } else {
         columnTempProfilePageGraphCompleteProfileDataSet->DrawUsingGuiLibVLine(140, 330, ((double) 500 / (double) (maxX / 10)), ((double) -250 / (double) maxY), graphColour1, graphColour2, colourBoundaryX);
     }
-        // &&&&
 #endif // TEST_GUILIB_VLINE_PROFILES
 }
 
@@ -3928,9 +3939,11 @@
 // No - draw a dummy profile section
 //         DrawProfileSectionUsingGuiLibVLine(SixteenBitColorValue(0xFF, 0, 0), 300, 500, 350, 200, 125);
     
+#ifdef TEST_GUILIB_VLINE_PROFILES
         // Now draw the profile as a solid colour, direct to the display.
         // Use the same parameters as the previous call, in DisplayColumnTempProfilePageGraph
         columnTempProfilePageGraphCompleteProfileDataSet->DrawUsingGuiLibVLine();
+#endif // TEST_GUILIB_VLINE_PROFILES
 #endif // SWIM_TEST
 
         GuiLib_ShowScreen(pageNumber, GuiLib_NO_CURSOR, GuiLib_RESET_AUTO_REDRAW);
@@ -4773,7 +4786,6 @@
     } else {
         injectorTempProfilePageGraphCompleteProfileDataSet->DrawUsingGuiLibVLine(140, 330, ((double) 500 / (double) (maxX / 10)), ((double) -250 / (double) maxY), graphColour1, graphColour2, colourBoundaryX);
     }
-        // &&&&
 #endif // TEST_GUILIB_VLINE_PROFILES
 }
 
@@ -4854,9 +4866,11 @@
 
         injectorTempProfilePageGraph->Redraw();
     
+#ifdef TEST_GUILIB_VLINE_PROFILES
         // Now draw the profile as a solid colour, direct to the display.
         // Use the same parameters as the previous call, in DisplayInjectorTempProfilePageGraph
         injectorTempProfilePageGraphCompleteProfileDataSet->DrawUsingGuiLibVLine();
+#endif // TEST_GUILIB_VLINE_PROFILES
 
         GuiLib_ShowScreen(GuiStruct_InjectorTempProfilePage_25, GuiLib_NO_CURSOR, GuiLib_RESET_AUTO_REDRAW);
     
@@ -6305,6 +6319,21 @@
     gasFlowProfilePageGraph->ShowDataSet(4);
 
     gasFlowProfilePageGraph->Redraw();
+    
+#ifdef TEST_GUILIB_VLINE_PROFILES
+    // *** TESTING *** Draw the profile as a solid colour, direct to the display
+    //                 Coords manually copied from easyGUI application.
+    //                 Boundary between colours is arbitrary for now
+    GuiConst_INTCOLOR graphColour1 = SixteenBitColorValue(100, 100, 100);
+    GuiConst_INTCOLOR graphColour2 = SixteenBitColorValue(200, 200, 200);
+//    double colourBoundaryX = (double) gasFlowProfilePageGraphCompleteProfileDataSet->GetTotalMethodTime() / 5.0; // Should be one-fifth across the profile
+    double colourBoundaryX = -1.0; // No - use one colour only
+    if(timeUnit == SECONDS) {
+        gasFlowProfilePageGraphCompleteProfileDataSet->DrawUsingGuiLibVLine(160, 330, ((double) 500 / (double) (maxX * 6)), ((double) -250 / (double) maxY), graphColour1, graphColour2, colourBoundaryX);
+    } else {
+        gasFlowProfilePageGraphCompleteProfileDataSet->DrawUsingGuiLibVLine(160, 330, ((double) 500 / (double) (maxX / 10)), ((double) -250 / (double) maxY), graphColour1, graphColour2, colourBoundaryX);
+    }
+#endif // TEST_GUILIB_VLINE_PROFILES
 }
 
 void GetGCStatusLoop::DisplayGasFlowProfilePageData(bool mustUpdateDisplay)
@@ -6369,6 +6398,12 @@
 
         gasFlowProfilePageGraph->Redraw();
     
+#ifdef TEST_GUILIB_VLINE_PROFILES
+        // Now draw the profile as a solid colour, direct to the display.
+        // Use the same parameters as the previous call, in DisplayInjectorTempProfilePageGraph
+        gasFlowProfilePageGraphCompleteProfileDataSet->DrawUsingGuiLibVLine();
+#endif // TEST_GUILIB_VLINE_PROFILES
+
         GuiLib_ShowScreen(GuiStruct_GasProfilePage_15, GuiLib_NO_CURSOR, GuiLib_RESET_AUTO_REDRAW);
     
         // Repeat the previous call to the version of this function with parameters,
@@ -9990,6 +10025,12 @@
                         Thread::wait(500); // 0.5 second
     
                         DisplayRunCompletePage();
+                        
+                        // Want to display "Run Complete" for 5 seconds, then the Home page.
+                        // Maybe this is all that is needed...
+                        // Thread::wait(5000);
+                        // DisplayHomePageData(true);
+
 
 //#define BUG_4_ALLOW_DEBUG_PRINTS_HERE
 #ifdef BUG_4_ALLOW_DEBUG_PRINTS_HERE