46 #define OLED_ANSWER_ACK 6 49 #define ALICEBLUE 0xF7DF 51 #define ANTIQUEWHITE 0xFF5A 55 #define AQUAMARINE 0x7FFA 65 #define BLANCHEDALMOND 0xFF59 69 #define BLUEVIOLET 0x895C 73 #define BURLYWOOD 0xDDD0 75 #define CADETBLUE 0x5CF4 77 #define CHARTREUSE 0x7FE0 79 #define CHOCOLATE 0xD343 83 #define CORNFLOWERBLUE 0x64BD 85 #define CORNSILK 0xFFDB 87 #define CRIMSON 0xD8A7 91 #define DARKBLUE 0x0011 93 #define DARKCYAN 0x0451 95 #define DARKGOLDENROD 0xBC21 97 #define DARKGRAY 0xAD55 99 #define DARKGREEN 0x0320 101 #define DARKKHAKI 0xBDAD 103 #define DARKMAGENTA 0x8811 105 #define DARKOLIVEGREEN 0x5345 107 #define DARKORANGE 0xFC60 109 #define DARKORCHID 0x9999 111 #define DARKRED 0x8800 113 #define DARKSALMON 0xECAF 115 #define DARKSEAGREEN 0x8DF1 117 #define DARKSLATEBLUE 0x49F1 119 #define DARKSLATEGRAY 0x2A69 121 #define DARKTURQUOISE 0x067A 123 #define DARKVIOLET 0x901A 125 #define DEEPPINK 0xF8B2 127 #define DEEPSKYBLUE 0x05FF 129 #define DIMGRAY 0x6B4D 131 #define DODGERBLUE 0x1C9F 133 #define FIREBRICK 0xB104 135 #define FLORALWHITE 0xFFDE 137 #define FORESTGREEN 0x2444 139 #define FUCHSIA 0xF81F 141 #define GAINSBORO 0xDEFB 143 #define GHOSTWHITE 0xFFDF 147 #define GOLDENROD 0xDD24 153 #define GREENYELLOW 0xAFE5 155 #define HONEYDEW 0xF7FE 157 #define HOTPINK 0xFB56 159 #define INDIANRED 0xCAEB 161 #define INDIGO 0x4810 167 #define LAVENDER 0xE73F 169 #define LAVENDERBLUSH 0xFF9E 171 #define LAWNGREEN 0x7FE0 173 #define LEMONCHIFFON 0xFFD9 175 #define LIGHTBLUE 0xAEDC 177 #define LIGHTCORAL 0xF410 179 #define LIGHTCYAN 0xE7FF 181 #define LIGHTGOLD 0xFFDA 183 #define LIGHTGREEN 0x9772 185 #define LIGHTGREY 0xD69A 187 #define LIGHTPINK 0xFDB8 189 #define LIGHTSALMON 0xFD0F 191 #define LIGHTSEAGREEN 0x2595 193 #define LIGHTSKYBLUE 0x867F 195 #define LIGHTSLATEGRAY 0x7453 197 #define LIGHTSTEELBLUE 0xB63B 199 #define LIGHTYELLOW 0xFFFC 203 #define LIMEGREEN 0x3666 207 #define MAGENTA 0xF81F 209 #define MAROON 0x8000 211 #define MEDIUMAQUAMARINE 0x6675 213 #define MEDIUMBLUE 0x0019 215 #define MEDIUMORCHID 0xBABA 217 #define MEDIUMPURPLE 0x939B 219 #define MEDIUMSEAGREEN 0x3D8E 221 #define MEDIUMSLATEBLUE 0x7B5D 223 #define MEDIUMSPRINGGREEN 0x07D3 225 #define MEDIUMTURQUOISE 0x4E99 227 #define MEDIUMVIOLETRED 0xC0B0 229 #define MIDNIGHTBLUE 0x18CE 231 #define MINTCREAM 0xF7FF 233 #define MISTYROSE 0xFF3C 235 #define MOCCASIN 0xFF36 237 #define NAVAJOWHITE 0xFEF5 241 #define OLDLACE 0xFFBC 245 #define OLIVEDRAB 0x6C64 247 #define ORANGE 0xFD20 249 #define ORANGERED 0xFA20 251 #define ORCHID 0xDB9A 253 #define PALEGOLDENROD 0xEF55 255 #define PALEGREEN 0x9FD3 257 #define PALETURQUOISE 0xAF7D 259 #define PALEVIOLETRED 0xDB92 261 #define PAPAYAWHIP 0xFF7A 263 #define PEACHPUFF 0xFED7 271 #define POWDERBLUE 0xB71C 273 #define PURPLE 0x8010 277 #define ROSYBROWN 0xBC71 279 #define ROYALBLUE 0x435C 281 #define SADDLEBROWN 0x8A22 283 #define SALMON 0xFC0E 285 #define SANDYBROWN 0xF52C 287 #define SEAGREEN 0x2C4A 289 #define SEASHELL 0xFFBD 291 #define SIENNA 0xA285 293 #define SILVER 0xC618 295 #define SKYBLUE 0x867D 297 #define SLATEBLUE 0x6AD9 299 #define SLATEGRAY 0x7412 303 #define SPRINGGREEN 0x07EF 305 #define STEELBLUE 0x4416 311 #define THISTLE 0xDDFB 313 #define TOMATO 0xFB08 315 #define TURQUOISE 0x471A 317 #define VIOLET 0xEC1D 323 #define WHITESMOKE 0xF7BE 325 #define YELLOW 0xFFE0 327 #define YELLOWGREEN 0x9E66 444 void gfx_DrawLine(
int x1,
int y1,
int x2,
int y2,
int color);
470 void gfx_Rectangle(
int x1,
int y1,
int x2,
int y2,
int color);
538 void ftoa(
char* p,
float x);
void gfx_Rectangle(int x1, int y1, int x2, int y2, int color)
Draw a rectangle.
Definition: oled.c:281
void setBaudRate()
Set the baud rate.
Definition: oled.c:269
void displayMainMenu()
Display menu.
Definition: oled.c:320
void displayCompass()
Display the compass.
Definition: oled.c:418
void gfx_PutString(char *string)
Put a string on the screen.
Definition: oled.c:108
void gfx_Clean()
Clean the screen.
Definition: oled.c:87
void toggleOLEDInterrupt(unsigned int state)
Toggle OLED interrupt.
Definition: oled.c:71
void usart1_rx()
Receive function for OLED data (USART1, interrupt mode)
Definition: oled.c:82
void gfx_CalculateOrbit(int angle, int distance, int *x, int *y)
Calculate the (x,y) pos (orbit) from angle and distance.
Definition: oled.c:153
unsigned int modeDisplay
Definition: oled.c:19
int displayHasBeenUpdated
Definition: oled.c:18
void gfx_ScreenMode(int mode)
Screen mode (portrait/landscape)
Definition: oled.c:234
void enableUSARTforOLED()
Enable and config USART for OLED.
Definition: oled.c:27
void txt_Width(int multi)
Set the width of the text.
Definition: oled.c:301
void gfx_MoveOrigin(int x, int y)
Move to origin to a position.
Definition: oled.c:221
unsigned int oldModeDisplay
Definition: oled.c:20
void gfx_BGcolour(int color)
Set the background color.
Definition: oled.c:96
void gfx_RectangleFilled(int x1, int y1, int x2, int y2, int color)
Draw a rectangle filled with a color.
Definition: oled.c:121
char * calculateDirection()
Calculate the direction (N, S, NE, etc.)
Definition: oled.c:509
void gfx_DrawLine(int x1, int y1, int x2, int y2, int color)
Draw a line.
Definition: oled.c:201
void ftoa(char *p, float x)
Float to string conversion.
Definition: oled.c:481
void SSTimeout(int t)
Screensave mode.
Definition: oled.c:141
void initOLED()
Configure OLED for proper using.
Definition: oled.c:312
void sendChar(int c)
Send char.
Definition: oled.c:77
void gfx_DrawCircle(int x, int y, int radius, int color)
Draw a circle.
Definition: oled.c:183
void displayHeader()
Display message header.
Definition: oled.c:399
void txt_FGColor(int color)
Set the text color.
Definition: oled.c:245
void txt_BGColor(int color)
Set the text background color.
Definition: oled.c:257
void displayMessage(char *string)
Display a string in the center of the screen.
Definition: oled.c:407
void resetOLED()
Reset OLED.
Definition: oled.c:63
void updateMenu()
Update the menu with currently selected.
Definition: oled.c:345