This is a fork of a functional ILI9341 display with a functional Seeed touch screen library.

Dependencies:   BMP180 UniGraphic mbed BNO055_fusionI_fixed HTU21D GPSISR Compass Fonts uGUI

Fork of TFT_test_NUCLEO-F411RE by Motoo Tanaka

/media/uploads/trevieze/win_20170427_21_31_20_pro.jpg

Had to move sensors to a remote board because of interference. Added spi burst mode to supported displays.

To do.... ugui buttons are slow. will need to add rtos to project. Finish other way points screen. Will have to rewrite portions of the touch screen class. Sense touch, delay, read values and then average, touch released, is the sequence. Add cadence input and logic to program for computer screen.

Revision:
22:39a8e5c47f3c
Parent:
21:39ef2fd5c4bf
--- a/main.cpp	Wed May 16 18:50:19 2018 +0000
+++ b/main.cpp	Fri May 18 18:26:36 2018 +0000
@@ -254,7 +254,7 @@
                     }
                     pageinit = 1;
                     if (bmp180.init() != 0) {
-                        //pc.printf("Error communicating with BMP180\n");
+                    //pc.printf("Error communicating with BMP180\n");
                     } else {
                         //pc.printf("Initialized BMP180\n");
                         bmp180.startTemperature();
@@ -320,7 +320,7 @@
                     }
                     break;
                 }
-                 //This is screen two of bike computer. It is executed every 2 seconds. Ie...refresh_Time
+                //This is screen two of bike computer. It is executed every 2 seconds. Ie...refresh_Time
                 case PAGE2: {
                     if (!pageinit) {
                         UG_WindowHide(&window_1);
@@ -330,6 +330,7 @@
                         TFT.drawXBitmap(20,35,compass,compass_width,compass_height,C_WHITE);
                     }
                     pageinit = 1;
+                    // Need to fix this. Documentation states that this is bitwise status. 
                     if (imu.read_calib_status() > 0x0) {
                         imu.get_Euler_Angles(&euler_angles);
                         float angle = euler_angles.h; // Convert radians to degrees for more a more usual result
@@ -366,7 +367,7 @@
             }
         }
     
-        /*
+        /*  Add Nav back onto screen 3
             TFT.locate(140, 260) ;
         TFT.printf("%.1fft", MyGPS.buffer.altitude/0.3048);
             TFT.locate(4, 280) ;
@@ -425,7 +426,7 @@
 void arrow(int x2, int y2, int x1, int y1, int alength, int awidth, int colour)
 {
     float distance;
-    int dx, dy, x2o,y2o,x3,y3,x4,y4,k;
+    int dx, dy, x2o, y2o, x3, y3, x4, y4, k;
     distance = sqrt(pow((double)(x1 - x2),2) + pow((double)(y1 - y2), 2));
     dx = x2 + (x1 - x2) * alength / distance;
     dy = y2 + (y1 - y2) * alength / distance;