Konacan kod

Dependencies:   BSP_DISCO_F469NIa EEPROM_DISCO_F469NI LCD_DISCO_F469NIa SD_DISCO_F469NI mbed

Fork of IntegrationCAN by Nenad Djalovic

Revision:
2:f54f01527ebb
Parent:
0:38c3afd99aeb
--- a/draw_print_library.h	Wed May 16 14:55:13 2018 +0000
+++ b/draw_print_library.h	Thu Jun 28 16:33:23 2018 +0000
@@ -1,7 +1,7 @@
 #include "LCD_DISCO_F469NI.h"
 #include "SD_DISCO_F469NI.h"
 
-#define PI  3.14159265358979323846  
+#define PI  3.14159265358979323846
 #define BYTE_TO_BINARY_PATTERN "%c%c%c%c%c%c%c%c"               //Pattern which converts uint8_t to binary(array of 8 chars)
 #define BYTE_TO_BINARY(byte)\
   (byte & 0x80 ? '1' : '0'),\
@@ -28,12 +28,13 @@
 const uint16_t LogoSmallXPos=635,LogoSmallYPos=5;                         //Small Logo, all three screens
 const uint16_t WaterTempXPos=15,WaterTempYPos=350;                        //Water Temperature in Main
 const uint16_t TPSXPos=569,TPSYPos=200;                                   //TPS in Main
-const uint16_t OilPXPos=330,OilPYPos=25;                                  //Oil Pressure in First Auxiliary
-const uint16_t MAPXPos=330,MAPYPos=100;                                   //MAP in First Auxiliary
-const uint16_t AirTempXPos=330,AirTempYPos=175;                           //Air Temperature in First Auxiliary
-const uint16_t LambdaXPos=330,LambdaYPos=250;                             //Lambda Sensor value in First Auxiliary
-const uint16_t VoltsXPos=330,VoltsYPos=325;                               //Volts in Accumulator in First Auxiliary
-const uint16_t CrankXPos=330,CrankYPos=400;                               //Crank Error Message in First Auxiliary
+const uint16_t OilPXPos=330,OilPYPos=30;                                  //Oil Pressure in First Auxiliary
+const uint16_t MAPXPos=330,MAPYPos=90;                                    //MAP in First Auxiliary
+const uint16_t AirTempXPos=330,AirTempYPos=150;                           //Air Temperature in First Auxiliary
+const uint16_t LambdaXPos=330,LambdaYPos=210;                             //Lambda Sensor value in First Auxiliary
+const uint16_t VoltsXPos=330,VoltsYPos=270;                               //Volts in Accumulator in First Auxiliary
+const uint16_t CrankXPos=330,CrankYPos=330;                               //Crank Error Message in First Auxiliary
+const uint16_t Meter_counterXPos=330,Meter_counterYPos=390;               //Kilometer counter in First Auxiliary
 //YPos in bottom position for LVDTs
 const uint16_t FLLVDTBarXPos=280,FLLVDTBarYPos=200;                       //Front Left Bar LVDT in Second Auxiliary
 const uint16_t FRLVDTBarXPos=440,FRLVDTBarYPos=200;                       //Front Right Bar LVDT in Second Auxiliary
@@ -45,18 +46,19 @@
 const uint16_t RRLVDTXPos=534,RRLVDTYPos=310;                             //Rear Right LVDT in Second Auxiliary
 
 
-typedef struct BWImage{         //Black-White Image Structure. These are stored on the controller
+typedef struct BWImage {                                                  //Black-White Image Structure. These are stored on the controller
     char name;
     uint16_t width;
     uint16_t height;
     uint8_t *bitmap;
-    } GEAR,CHAR;
+} GEAR,CHAR;
 
-typedef struct RGBImage{        //RGB Coloured Image Structure. These are stored on SD Card
+typedef struct RGBImage {                                                 //RGB Coloured Image Structure. These are stored on SD Card
     uint16_t width;
     uint16_t height;
     uint32_t START_ADDR;
-    }IMAGE;
+} IMAGE;
+
 
 void DrawSpeedMeter();                                                                                                    //Draw Speedmeter function
 void PrintChar(CHAR Char,uint16_t StartXPos,uint16_t StartYPos,uint32_t TextColor);                                       //Print Char function