Velocity Closed Loop Dynamic error correction

Dependencies:   mbed QEI PID DmTftLibraryEx

Committer:
mverdy
Date:
Thu Nov 08 10:14:39 2018 +0000
Revision:
20:626b92b70bf7
Child:
21:ab8027016a2c
Addition of missing modules to synchronize with v1.5.2

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mverdy 20:626b92b70bf7 1 /*
mverdy 20:626b92b70bf7 2 ______ _
mverdy 20:626b92b70bf7 3 / _____) _ | |
mverdy 20:626b92b70bf7 4 ( (____ _____ ____ _| |_ _____ ____| |__
mverdy 20:626b92b70bf7 5 \____ \| ___ | (_ _) ___ |/ ___) _ \
mverdy 20:626b92b70bf7 6 _____) ) ____| | | || |_| ____( (___| | | |
mverdy 20:626b92b70bf7 7 (______/|_____)_|_|_| \__)_____)\____)_| |_|
mverdy 20:626b92b70bf7 8 (C)2016 Semtech
mverdy 20:626b92b70bf7 9
mverdy 20:626b92b70bf7 10 Description: Display driver header
mverdy 20:626b92b70bf7 11
mverdy 20:626b92b70bf7 12 Maintainer: Gregory Cristian & Gilbert Menth
mverdy 20:626b92b70bf7 13 */
mverdy 20:626b92b70bf7 14
mverdy 20:626b92b70bf7 15 #ifndef TFT_DISPLAY_DRIVER_H
mverdy 20:626b92b70bf7 16 #define TFT_DISPLAY_DRIVER_H
mverdy 20:626b92b70bf7 17
mverdy 20:626b92b70bf7 18
mverdy 20:626b92b70bf7 19 #include "DmTftBase.h"
mverdy 20:626b92b70bf7 20
mverdy 20:626b92b70bf7 21
mverdy 20:626b92b70bf7 22 #define SCREEN_WIDTH 240
mverdy 20:626b92b70bf7 23 #define SCREEN_HEIGHT 320
mverdy 20:626b92b70bf7 24
mverdy 20:626b92b70bf7 25 #define TEXT_COLOR WHITE
mverdy 20:626b92b70bf7 26 #define BACK_COLOR BLACK
mverdy 20:626b92b70bf7 27 #define PAGE_COLOR CYAN
mverdy 20:626b92b70bf7 28 #define OBJECT_ERROR RED
mverdy 20:626b92b70bf7 29 #define BUTTON_BORDER BLUE
mverdy 20:626b92b70bf7 30 #define MENU_TEXT GREEN
mverdy 20:626b92b70bf7 31 #define TEXT_VALUE YELLOW
mverdy 20:626b92b70bf7 32 #define CIRCLE_FCOLOR GRAY1
mverdy 20:626b92b70bf7 33
mverdy 20:626b92b70bf7 34
mverdy 20:626b92b70bf7 35 typedef enum
mverdy 20:626b92b70bf7 36 {
mverdy 20:626b92b70bf7 37 GO_STATUS_NOERR,
mverdy 20:626b92b70bf7 38 GO_STATUS_BAD_COORD,
mverdy 20:626b92b70bf7 39 GO_STATUS_BAD_ARG,
mverdy 20:626b92b70bf7 40 GO_STATUS_BAD_CONTEXT,
mverdy 20:626b92b70bf7 41 }GraphObjectStatus_t;
mverdy 20:626b92b70bf7 42
mverdy 20:626b92b70bf7 43 typedef enum
mverdy 20:626b92b70bf7 44 {
mverdy 20:626b92b70bf7 45 GO_TEXT,
mverdy 20:626b92b70bf7 46 GO_RECTANGLE,
mverdy 20:626b92b70bf7 47 GO_CIRCLE,
mverdy 20:626b92b70bf7 48 GO_TRIANGLE,
mverdy 20:626b92b70bf7 49 GO_IMAGE,
mverdy 20:626b92b70bf7 50 GO_LINE,
mverdy 20:626b92b70bf7 51 }GraphObjectType_t;
mverdy 20:626b92b70bf7 52
mverdy 20:626b92b70bf7 53 typedef struct
mverdy 20:626b92b70bf7 54 {
mverdy 20:626b92b70bf7 55 uint8_t Id;
mverdy 20:626b92b70bf7 56 GraphObjectType_t Type;
mverdy 20:626b92b70bf7 57 uint16_t Xpos;
mverdy 20:626b92b70bf7 58 uint16_t Ypos;
mverdy 20:626b92b70bf7 59 uint16_t Height;
mverdy 20:626b92b70bf7 60 uint16_t Width;
mverdy 20:626b92b70bf7 61 uint16_t LineWidth;
mverdy 20:626b92b70bf7 62 uint16_t BackColor;
mverdy 20:626b92b70bf7 63 uint16_t FrontColor;
mverdy 20:626b92b70bf7 64 bool DoFill;
mverdy 20:626b92b70bf7 65 uint16_t FillColor;
mverdy 20:626b92b70bf7 66 uint8_t* Source;
mverdy 20:626b92b70bf7 67 bool TouchActive;
mverdy 20:626b92b70bf7 68 }GraphObject_t;
mverdy 20:626b92b70bf7 69
mverdy 20:626b92b70bf7 70
mverdy 20:626b92b70bf7 71 /*!
mverdy 20:626b92b70bf7 72 * \brief Initialses the hardware and variables associated with the display.
mverdy 20:626b92b70bf7 73 */
mverdy 20:626b92b70bf7 74 void DisplayDriverInit( void );
mverdy 20:626b92b70bf7 75
mverdy 20:626b92b70bf7 76 /*!
mverdy 20:626b92b70bf7 77 * \brief Calibrates the touch screen.
mverdy 20:626b92b70bf7 78 */
mverdy 20:626b92b70bf7 79 void DisplayDriverCalibrate( void );
mverdy 20:626b92b70bf7 80
mverdy 20:626b92b70bf7 81 /*!
mverdy 20:626b92b70bf7 82 * \brief Draws a graphical object.
mverdy 20:626b92b70bf7 83 *
mverdy 20:626b92b70bf7 84 * \param [in] *goObject Object to draw.
mverdy 20:626b92b70bf7 85 * \param [in] *source If object is a text : *source is the text to print
mverdy 20:626b92b70bf7 86 * If object is a image: *source is the image
mverdy 20:626b92b70bf7 87 * For the other type of goObject, *source is ignored
mverdy 20:626b92b70bf7 88 * \param [in] doFill Indicate if the goObject (only for GO_RECTANGLE,
mverdy 20:626b92b70bf7 89 * GO_CIRCLE & GO_TRIANGLE) should be filled or not.
mverdy 20:626b92b70bf7 90 * \param [in] activeTouch Indicate if the coordinates of the goObject can be
mverdy 20:626b92b70bf7 91 * used for touchscreen or not.
mverdy 20:626b92b70bf7 92 * \retval status GO_STATUS_NOERR if ok or,
mverdy 20:626b92b70bf7 93 * GO_STATUS_BAD_COORD if the object go out of screen
mverdy 20:626b92b70bf7 94 */
mverdy 20:626b92b70bf7 95 GraphObjectStatus_t GraphObjectDraw( GraphObject_t* goObject, uint8_t* source, \
mverdy 20:626b92b70bf7 96 bool doFill, bool activeTouch);
mverdy 20:626b92b70bf7 97
mverdy 20:626b92b70bf7 98 /*!
mverdy 20:626b92b70bf7 99 * \brief Clear a graphical object.
mverdy 20:626b92b70bf7 100 *
mverdy 20:626b92b70bf7 101 * \param [in] *goObject Object to clear.
mverdy 20:626b92b70bf7 102 * \param [in] doFill Indicate if the goObject (only for GO_RECTANGLE,
mverdy 20:626b92b70bf7 103 * GO_CIRCLE & GO_TRIANGLE) should be filled or not.
mverdy 20:626b92b70bf7 104 * \retval status GO_STATUS_NOERR if ok or,
mverdy 20:626b92b70bf7 105 * GO_STATUS_BAD_COORD if the object go out of screen
mverdy 20:626b92b70bf7 106 */
mverdy 20:626b92b70bf7 107 GraphObjectStatus_t GraphObjectClear( GraphObject_t* goObject, bool doFill );
mverdy 20:626b92b70bf7 108
mverdy 20:626b92b70bf7 109 /*!
mverdy 20:626b92b70bf7 110 * \brief Get the first object that have the touched coordinate (if activateTouch
mverdy 20:626b92b70bf7 111 * of the object is TRUE).
mverdy 20:626b92b70bf7 112 *
mverdy 20:626b92b70bf7 113 * \param [in] *objects Tab of grophical objects.
mverdy 20:626b92b70bf7 114 * \param [in] objectsCount Indicate the numbre of goObject in the tab.
mverdy 20:626b92b70bf7 115 * \param [out] touchedObject Put the ID of the first touched and activated
mverdy 20:626b92b70bf7 116 * object of the tab.
mverdy 20:626b92b70bf7 117 * \retval status GO_STATUS_NOERR if ok.
mverdy 20:626b92b70bf7 118 */
mverdy 20:626b92b70bf7 119 GraphObjectStatus_t GraphObjectTouched( GraphObject_t* objects, \
mverdy 20:626b92b70bf7 120 uint8_t objectsCount, \
mverdy 20:626b92b70bf7 121 uint8_t* touchedObject);
mverdy 20:626b92b70bf7 122
mverdy 20:626b92b70bf7 123 /*!
mverdy 20:626b92b70bf7 124 * \brief Draws a logo on the display.
mverdy 20:626b92b70bf7 125 *
mverdy 20:626b92b70bf7 126 * \param [in] *thisBmp The file to be printed onto the display.
mverdy 20:626b92b70bf7 127 * \param [in] xPos Position across the display in pixels for the top
mverdy 20:626b92b70bf7 128 * right corner of the logo starting at the left edge
mverdy 20:626b92b70bf7 129 * of display.
mverdy 20:626b92b70bf7 130 * \param [in] yPos Position across the display in pixels for the top
mverdy 20:626b92b70bf7 131 * right corner of the logo starting at the top of
mverdy 20:626b92b70bf7 132 * the display.
mverdy 20:626b92b70bf7 133 */
mverdy 20:626b92b70bf7 134 void DisplayDriverDrawLogo( uint8_t *thisBmp, uint8_t xPos, uint8_t yPos );
mverdy 20:626b92b70bf7 135
mverdy 20:626b92b70bf7 136 #endif //TFT_DISPLAY_DRIVER_H
mverdy 20:626b92b70bf7 137