Attempts to merge SPI_TFT2 & SPI_TFT_ILI9341

Dependencies:   SPI_TFTx2 TFT_fonts TOUCH_TFTx2 mbed

Fork of CANary by Tick Tock

Committer:
TickTock
Date:
Tue Dec 24 12:20:50 2013 +0000
Revision:
170:7ee98e3611bc
Parent:
167:58d4edf403d4
Child:
171:355e284f5201
// Added kWperGid scalar to config file.  .075 appears to be too small; // Added CCkWh_trip to TripLog (after kWh_trip); // Added uncalibrated available regen bars to dte screen

Who changed what in which revision?

UserRevisionLine numberNew contents of line
TickTock 12:8e42d7ba8468 1 // This contains all the display subroutines
TickTock 12:8e42d7ba8468 2
TickTock 12:8e42d7ba8468 3 #include "TOUCH_TFTx2.h"
TickTock 12:8e42d7ba8468 4 #include "Arial12x12.h"
TickTock 12:8e42d7ba8468 5 #include "Arial12x12_prop.h"
TickTock 22:a43df3905863 6 #include "Arial24x23.h"
TickTock 12:8e42d7ba8468 7 #include "Arial28x28.h"
TickTock 12:8e42d7ba8468 8 #include "Neu42x35.h"
TickTock 12:8e42d7ba8468 9 #include "SCProSB31x55.h"
TickTock 13:62e0f7f39ff5 10 #include "common.h"
TickTock 12:8e42d7ba8468 11
TickTock 13:62e0f7f39ff5 12 extern CANMessage lastMsg[100];
TickTock 13:62e0f7f39ff5 13 extern unsigned char indexOffset;
TickTock 13:62e0f7f39ff5 14 extern unsigned char msgChanged[100];
TickTock 13:62e0f7f39ff5 15 extern char displayLog[20][40];
TickTock 13:62e0f7f39ff5 16 extern unsigned char displayLoc;
TickTock 13:62e0f7f39ff5 17 extern char indexLastMsg[0x800];
garygid 87:46ac3f2519d6 18
TickTock 124:0d622967b764 19 //extern unsigned char battData[256]; //
TickTock 124:0d622967b764 20 extern unsigned char battData[BatDataBufMax]; // BatDataBufMax
TickTock 170:7ee98e3611bc 21 extern unsigned long maxTarget;
TickTock 13:62e0f7f39ff5 22 extern bool showCP;
TickTock 23:cd03f9c3395e 23 extern bool logEn;
TickTock 108:29b5a760adc2 24 extern bool usbEn;
TickTock 48:d1ce92104a1f 25 extern bool yesBattLog; // gg - Batt Log
TickTock 33:a277743ebdeb 26 extern bool repeatPoll;
TickTock 13:62e0f7f39ff5 27 extern unsigned char dMode[2];
TickTock 13:62e0f7f39ff5 28 extern unsigned char lastDMode[2];
TickTock 13:62e0f7f39ff5 29 extern unsigned char sMode;
TickTock 13:62e0f7f39ff5 30 extern TOUCH_TFTx2 tt;
TickTock 25:ddf0ec209f03 31 extern unsigned char dtMode;
TickTock 35:5acbd8a64a89 32 extern float accV;
TickTock 143:88b5155622a5 33 extern float accV2;
TickTock 36:dbd39c315258 34 extern bool playbackEn;
TickTock 36:dbd39c315258 35 extern bool playbackOpen;
TickTock 36:dbd39c315258 36 extern float playbackInt;
TickTock 107:e9be732c1ad4 37 extern float miles_trip[3];
TickTock 107:e9be732c1ad4 38 extern float kWh_trip[3];
TickTock 167:58d4edf403d4 39 extern float CCkWh_trip[3];
TickTock 49:a3d2c5bb3cfa 40 extern float kW[39];
TickTock 49:a3d2c5bb3cfa 41 extern float mpkWh[39];
TickTock 162:c6545fc0164a 42 extern float mpkWh_noCC;
TickTock 42:4533b13b297d 43 extern unsigned char whichTouched;
TickTock 48:d1ce92104a1f 44 extern unsigned char skin;
TickTock 50:83d5864c64a0 45 extern unsigned char dtePeriod;
TickTock 121:553faf139a20 46 extern bool tock;
TickTock 164:46ed06263b0e 47 extern bool refresh;
TickTock 108:29b5a760adc2 48 extern DigitalOut led4;
TickTock 73:62ee8eae3a84 49 extern unsigned char tNavRow; // gg - 4x4
TickTock 73:62ee8eae3a84 50 extern unsigned short pointerSep; // log write buffer pointer separation
TickTock 108:29b5a760adc2 51 extern float maxTemp;
TickTock 102:fd19f777a0b4 52 extern unsigned long Ah_x10000;
TickTock 102:fd19f777a0b4 53 extern unsigned long SOC_x10000;
TickTock 143:88b5155622a5 54 extern unsigned short SOH2_x100;
leafman 98:9f8bab96edff 55 extern bool metric;
TickTock 118:02010b18efdc 56 extern unsigned char tNavRow ; // gg - 4x4
TickTock 118:02010b18efdc 57 extern char revStr[7]; // gg - version
TickTock 118:02010b18efdc 58 extern bool debugMode;
TickTock 119:0e2b641e98a2 59 extern float unloadedV_x2;
TickTock 118:02010b18efdc 60 extern float Resr;
TickTock 121:553faf139a20 61 extern bool shunt[96];
TickTock 121:553faf139a20 62 extern float unloadedV_x2,Resr,curRmax,curRmin,redRmax,redRmin,incRmax,incRmin;
TickTock 121:553faf139a20 63 extern signed short Imax, Imin;
TickTock 131:0d926c080a65 64 extern bool showHealth;
TickTock 167:58d4edf403d4 65 extern float maxTripEff, minTripEff, maxTripMiles, minTripMiles, maxTripkWh, minTripkWh, maxTripCCkWh, minTripCCkWh;
TickTock 159:577e9d015693 66 extern bool brakeMon, regenMon, heaterMon;
TickTock 148:6e3b9135fad2 67 extern unsigned short uMsgId[8];
TickTock 152:a4d66901785d 68 extern bool accOn;
TickTock 152:a4d66901785d 69 extern bool autoSync;
TickTock 153:e94cfe3c339c 70 extern unsigned short modelYear;
TickTock 154:90ea16ca7475 71 extern bool enableSound;
TickTock 156:4e5d30535cf9 72 extern bool idir;
TickTock 158:059abeb44ba1 73 extern bool autoSync;
TickTock 158:059abeb44ba1 74 extern bool clearTest;
TickTock 161:71ac85d11f03 75 extern float CCkW;
TickTock 164:46ed06263b0e 76 extern bool CCon;
TickTock 170:7ee98e3611bc 77 extern float kWperGid;
TickTock 170:7ee98e3611bc 78 extern unsigned short startGids;
TickTock 12:8e42d7ba8468 79
TickTock 12:8e42d7ba8468 80 extern "C" {
TickTock 42:4533b13b297d 81 void printLast (bool force, bool showButtons);
TickTock 42:4533b13b297d 82 void printChanged (bool force, bool showButtons);
TickTock 42:4533b13b297d 83 void printLog (bool force, bool showButtons);
TickTock 42:4533b13b297d 84 void mainDisplay (bool force, bool showButtons);
TickTock 50:83d5864c64a0 85 void dteDisplay (bool force, bool showButtons, bool showMiles);
TickTock 42:4533b13b297d 86 void braking (bool force, bool showButtons, bool prdata);
TickTock 42:4533b13b297d 87 void cpData(bool force, bool showButtons);
TickTock 47:9cc7d876dd6d 88 void cpHistogram(bool force, bool showButtons); // gg - hist
TickTock 48:d1ce92104a1f 89 void cpBarPlot(bool force, bool showButtons); // gg - cpbars
garygid 67:2022fce701d0 90 void showIndex(bool force, bool showButtons); // gg - index
TickTock 42:4533b13b297d 91 void showDateTime(bool force, bool showButtons);
TickTock 13:62e0f7f39ff5 92 void updateDisplay(char display);
TickTock 24:6cf76ed8c432 93 void showButton(unsigned char column, unsigned char row, char * text1, char * text2, unsigned char columns, unsigned char rows);
TickTock 62:ffd15edb5431 94 void highlightButton(unsigned char column, unsigned char row, unsigned char tScn, unsigned char columns, unsigned char rows);
leafman 98:9f8bab96edff 95 float convertDistance(float input); // LM - Metric
TickTock 148:6e3b9135fad2 96 float convertC(float input); // LM - Metric
TickTock 148:6e3b9135fad2 97 float convertF(float input); // LM - Metric
leafman 98:9f8bab96edff 98 char* distanceUnit(); // LM - Metric
leafman 98:9f8bab96edff 99 char* temperatureUnit(); // LM - Metric
TickTock 12:8e42d7ba8468 100 }