From be99a3f31fe6e652559d344e8442c7ed5ecc3e92 Mon Sep 17 00:00:00 2001 From: iangchristensen Date: Mon, 22 Jul 2019 19:04:20 -0400 Subject: [PATCH] Modified getCharInfo to accomodate for multiple fonts --- src/hyperdisplay.cpp | 204 ++++++++++++++++---------- src/hyperdisplay.h | 206 ++++++++++++++------------- src/util/font5x7.h | 2 +- src/util/font8x16.h | 120 ++++++++++++++++ src/util/fontlargenumber.h | 74 ++++++++++ src/util/hyperdisplay_default_conf.h | 9 +- 6 files changed, 437 insertions(+), 178 deletions(-) create mode 100644 src/util/font8x16.h create mode 100644 src/util/fontlargenumber.h diff --git a/src/hyperdisplay.cpp b/src/hyperdisplay.cpp index de5b493..ec270f9 100644 --- a/src/hyperdisplay.cpp +++ b/src/hyperdisplay.cpp @@ -8,19 +8,25 @@ header file: hyperdisplay.h #include "hyperdisplay.h" // Click here to get the library: http://librarymanager/SparkFun_HyperDisplay wind_info_t hyperdisplayDefaultWindow; // This window is used by default so that the user does not have to worry about windows if they don't want to -char_info_t hyperdisplayDefaultCharacter; // The default character to use +char_info_t hyperdisplayCharacter; // The default character to use #if HYPERDISPLAY_USE_PRINT - #if HYPERDISPLAY_INCLUDE_DEFAULT_FONT - #if __has_include ( ) - hd_font_extent_t hyperdisplayDefaultXloc[HYPERDISPLAY_DEFAULT_FONT_WIDTH*HYPERDISPLAY_DEFAULT_FONT_HEIGHT]; - hd_font_extent_t hyperdisplayDefaultYloc[HYPERDISPLAY_DEFAULT_FONT_WIDTH*HYPERDISPLAY_DEFAULT_FONT_HEIGHT]; - #endif /* __has_include( ) */ + const unsigned char *hyperdisplay::fontsPointer[] = { + font5x7, + font8x16 + }; + #if HYPERDISPLAY_INCLUDE_SMALL_FONT + hd_font_extent_t hyperdisplayXloc[HYPERDISPLAY_SMALL_FONT_WIDTH*HYPERDISPLAY_SMALL_FONT_HEIGHT]; + hd_font_extent_t hyperdisplayYloc[HYPERDISPLAY_SMALL_FONT_WIDTH*HYPERDISPLAY_SMALL_FONT_HEIGHT]; + uint8_t FONT_TYPE = 0; + #endif + #if HYPERDISPLAY_INCLUDE_LARGE_FONT + hd_font_extent_t hyperdisplayXloc[HYPERDISPLAY_LARGE_FONT_WIDTH*HYPERDISPLAY_LARGE_FONT_HEIGHT]; + hd_font_extent_t hyperdisplayYloc[HYPERDISPLAY_LARGE_FONT_WIDTH*HYPERDISPLAY_LARGE_FONT_HEIGHT]; + uint8_t FONT_TYPE = 1; #endif #endif - - ///////////////////////////////////////////// // Constructor ///////////////////////////////////////////// @@ -228,7 +234,7 @@ void hyperdisplay::hwfillFromArray(hd_hw_extent_t x0, hd_hw_extent_t y0, hd_hw_e -// Buffer writing functions - all buffers areread left-to-right and top to bottom. Width and height are specified in the associated window's settings. Coordinates are window coordinates +// Buffer writing functions - all buffers are read left-to-right and top to bottom. Width and height are specified in the associated window's settings. Coordinates are window coordinates hd_pixels_t hyperdisplay::wToPix( wind_info_t* wind, hd_hw_extent_t x0, hd_hw_extent_t y0) { @@ -660,15 +666,15 @@ void hyperdisplay::setCurrentWindowColorSequence(color_t data, hd_colors_t color int hyperdisplay::setWindowMemory(wind_info_t * wind, color_t data, hd_pixels_t numPixels, uint8_t bpp, bool allowDynamic) { if(wind == NULL){ return -1; } - if (wind->dynamic) { - if(wind->data != NULL){ // If there was a buffer previously associated you need to handle getting rid of it - if(wind->dynamic){ // If it was dynamically allocated then free the memory - free(wind->data); // Maybe should use delete? - } - wind->numPixels = 0; - wind->dynamic = false; + + if(wind->data != NULL){ // If there was a buffer previously associated you need to handle getting rid of it + if(wind->dynamic){ // If it was dynamically allocated then free the memory + free(wind->data); // Maybe should use delete? } + wind->numPixels = 0; + wind->dynamic = false; } + if(data == NULL){ // If the user does not supply a pointer then try dynamic allocation if(allowDynamic){ color_t ptemp = NULL; @@ -760,6 +766,8 @@ void hyperdisplay::show( wind_info_t * wind ){ // Outputs the current w + + @@ -768,104 +776,146 @@ void hyperdisplay::show( wind_info_t * wind ){ // Outputs the current w size_t hyperdisplay::write(uint8_t val) { size_t numWritten = 0; - getCharInfo(val, &hyperdisplayDefaultCharacter); + getCharInfo(val, &hyperdisplayCharacter); // Check to see if current cursor coordinates work for the requested character - if(((pCurrentWindow->xMax - pCurrentWindow->xMin) - hyperdisplayDefaultCharacter.xDim) < pCurrentWindow->cursorX) + if(((pCurrentWindow->xMax - pCurrentWindow->xMin) - hyperdisplayCharacter.xDim) < pCurrentWindow->cursorX) { - if(((pCurrentWindow->yMax - pCurrentWindow->yMin) - hyperdisplayDefaultCharacter.yDim) < pCurrentWindow->cursorY) + if(((pCurrentWindow->yMax - pCurrentWindow->yMin) - hyperdisplayCharacter.yDim) < pCurrentWindow->cursorY) { return numWritten; // return because there is no more room in the x or y directions of the window } pCurrentWindow->cursorX = pCurrentWindow->xReset; // Put x cursor back to reset location - pCurrentWindow->cursorY += hyperdisplayDefaultCharacter.yDim; // Move the cursor down by the size of the character + pCurrentWindow->cursorY += hyperdisplayCharacter.yDim; // Move the cursor down by the size of the character } // Now write the character - if(hyperdisplayDefaultCharacter.show) + if(hyperdisplayCharacter.show) { - //fillFromArray(pCurrentWindow->cursorX, pCurrentWindow->cursorY, pCurrentWindow->cursorX+hyperdisplayDefaultCharacter.xDim, pCurrentWindow->cursorY+hyperdisplayDefaultCharacter.yDim, hyperdisplayDefaultCharacter.numPixels, hyperdisplayDefaultCharacter.data); - for(uint32_t indi = 0; indi < hyperdisplayDefaultCharacter.numPixels; indi++) + // fillFromArray(pCurrentWindow->cursorX, pCurrentWindow->cursorY, pCurrentWindow->cursorX+hyperdisplayCharacter.xDim, pCurrentWindow->cursorY+hyperdisplayCharacter.yDim, hyperdisplayCharacter.numPixels, hyperdisplayCharacter.data); + for(uint32_t indi = 0; indi < hyperdisplayCharacter.numPixels; indi++) { - pixel(((pCurrentWindow->cursorX)+*(hyperdisplayDefaultCharacter.xLoc + indi)), ((pCurrentWindow->cursorY)+*(hyperdisplayDefaultCharacter.yLoc + indi)), NULL, 1, 0); + pixel(((pCurrentWindow->cursorX)+*(hyperdisplayCharacter.xLoc + indi)), ((pCurrentWindow->cursorY)+*(hyperdisplayCharacter.yLoc + indi)), NULL, 1, 0); } numWritten = 1; // Now advance the cursor in the x direction so that you don't overwrite the work you just did - pCurrentWindow->cursorX += hyperdisplayDefaultCharacter.xDim + 1; + pCurrentWindow->cursorX += hyperdisplayCharacter.xDim + 1; } - pCurrentWindow->lastCharacter = hyperdisplayDefaultCharacter; // Set this character as the previous character - the info will persist because this is direct + pCurrentWindow->lastCharacter = hyperdisplayCharacter; // Set this character as the previous character - the info will persist because this is direct return numWritten; } -#if HYPERDISPLAY_INCLUDE_DEFAULT_FONT - #if __has_include ( ) - void hyperdisplay::getCharInfo(uint8_t character, char_info_t * character_info) + void hyperdisplay::getCharInfo(uint8_t character, char_info_t * character_info) + { + // Retrieve local constants from the font header + uint8_t FONT_HEADER_SIZE= 6; + uint8_t FONT_WIDTH = pgm_read_byte(fontsPointer[FONT_TYPE] + 0); + uint8_t FONT_HEIGHT = pgm_read_byte(fontsPointer[FONT_TYPE] + 1); + uint8_t FONT_START_CHAR = pgm_read_byte(fontsPointer[FONT_TYPE] + 2); + uint8_t FONT_TOTAL_CHAR = pgm_read_byte(fontsPointer[FONT_TYPE] + 3); + uint16_t FONT_MAP_WIDTH = (pgm_read_byte(fontsPointer[FONT_TYPE] + 4) * 100) + + pgm_read_byte(fontsPointer[FONT_TYPE] + 5); + + // Initialize the local variables + uint8_t indi, indj, row, currentByte, rowsToDraw, pixelLocationArrayIndex = 0; + rowsToDraw = FONT_HEIGHT / 8; + + // Set the character structure to the selected font + character_info->data = NULL; + character_info->xLoc = hyperdisplayXloc; + character_info->yLoc = hyperdisplayYloc; + character_info->xDim = FONT_WIDTH; + character_info->yDim = FONT_HEIGHT; + character_info->numPixels = 0; + + // Figure out if the character should cause a newline + if (character == '\r' || character == '\n') { - // This is the most basic font implementation, it only prints a monochrome character using the first color of the current window's current color sequence - // If you want any more font capabilities then you should re-implement this function :D - - character_info->data = NULL; // Use the window's current color - - // Link the default cordinate arrays - character_info->xLoc = hyperdisplayDefaultXloc; - character_info->yLoc = hyperdisplayDefaultYloc; + character_info->causesNewline = true; + } + else + { + character_info->causesNewline = false; + } - character_info->xDim = 5; - character_info->yDim = 8; + // Figure out if you need to actually show the chracter + if ((character >= ' ') && (character <= '~')) + { + character_info->show = true; + } + else + { + character_info->show = false; + return; // No point in continuing; + } - // Figure out if the character should cause a newline - if (character == '\r' || character == '\n') - { - character_info->causesNewline = true; - } - else - { - character_info->causesNewline = false; - } + // Figure out if the character is within the font range + if ((character < FONT_START_CHAR) || (character > (FONT_START_CHAR + FONT_TOTAL_CHAR - 1))) { + return; + } - // Figure out if you need to actually show the chracter - if((character >= ' ') && (character <= '~')) - { - character_info->show = true; - } - else - { - character_info->show = false; - return; // No point in continuing; - } + // Figure out if the number of rows is one or more rows + if (rowsToDraw <= 1) + { + rowsToDraw = 1; + } - // Load up the character data and fill in coordinate data - uint8_t values[5]; // Holds the 5 bytes for the character - uint16_t offset = 6 + 5 * (character - 0); - character_info->numPixels = 0; - uint16_t n = 0; - for(uint8_t indi = 0; indi < 5; indi++) + // Load up the character data and fill in coordinate data + if (rowsToDraw == 1) + { + for (indi = 0; indi < FONT_WIDTH; indi++) { - values[indi] = pgm_read_byte(font5x7 + offset + indi); - for(uint8_t indj = 0; indj < 8; indj++) + // Retreive a single byte of data + currentByte = pgm_read_byte(fontsPointer[FONT_TYPE] + FONT_HEADER_SIZE + ((character - FONT_START_CHAR) * FONT_WIDTH) + indi); + for (indj = 0; indj < 8; indj++) { - if(values[indi] & (0x01 << indj)) + // Figure out which pixels should be on or off + if (currentByte & (0x01 << indj)) { + // Update the character stuct character_info->numPixels++; - *(character_info->xLoc + n) = (hd_font_extent_t)indi; - *(character_info->yLoc + n) = (hd_font_extent_t)indj; - n++; + *(character_info->xLoc + pixelLocationArrayIndex) = (hd_font_extent_t)indi; + *(character_info->yLoc + pixelLocationArrayIndex) = (hd_font_extent_t)indj; + pixelLocationArrayIndex++; } } } + return; } - #else - #warning "HyperDisplay Default Font Not Supported. Printing will not work without a custom implementation" - void hyperdisplay::getCharInfo(uint8_t character, char_info_t * character_info) + else { - // A blank implementation of getCharInfo for when the target does not support - character_info->show = false; + // Figure out the location of the lower half of the characters + uint16_t charactersPerBitmapRow = FONT_MAP_WIDTH / FONT_WIDTH; + uint16_t characterColumnPositionOnBitmap = (character - FONT_START_CHAR) % charactersPerBitmapRow; + uint16_t characterRowPositionOnBitmap = (character - FONT_START_CHAR) / charactersPerBitmapRow; + uint16_t characterBitmapStartPosition = (characterRowPositionOnBitmap * FONT_MAP_WIDTH * (FONT_HEIGHT / 8)) + (characterColumnPositionOnBitmap * FONT_WIDTH); + + // Load up the character data and fill in coordinate data one row at a time + for (row = 0; row < rowsToDraw; row++) + { + for (indi = 0; indi < FONT_WIDTH; indi++) + { + // Retreive a single byte of data + currentByte = pgm_read_byte(fontsPointer[FONT_TYPE] + FONT_HEADER_SIZE + characterBitmapStartPosition + (row * FONT_MAP_WIDTH) + indi); + for (indj = 0; indj < 8; indj++) + { + if (currentByte & (0x01 << indj)) + { + // Update the character stuct + character_info->numPixels++; + *(character_info->xLoc + pixelLocationArrayIndex) = (hd_font_extent_t)indi; + *(character_info->yLoc + pixelLocationArrayIndex) = (hd_font_extent_t)(indj + (row * 8)); + pixelLocationArrayIndex++; + } + } + } + } + return; } - #endif /* __has_include( ) */ -#endif /* HYPERDISPLAY_INCLUDE_DEFAULT_FONT */ + } #else /* HYPERDISPLAY_USE_PRINT */ // This is here in case you choose not to implement printing functions diff --git a/src/hyperdisplay.h b/src/hyperdisplay.h index fb3c7e8..1ff5833 100644 --- a/src/hyperdisplay.h +++ b/src/hyperdisplay.h @@ -4,10 +4,12 @@ SparkFun Master Display Library Created: July 2018 Modified: August 2018 +Modified: July 2019 Authors: - Ciara Jekel - Owen Lyke + Ciara Jekel + Owen Lyke + Ian Christensen Purpose: This library standardizes interfaces to displays of many types. This header provides the most abstract class called 'display' @@ -16,7 +18,7 @@ Purpose: This library standardizes interfaces to displays of many types. */ -#ifndef HYPERDISPLAY_H +#ifndef HYPERDISPLAY_H #define HYPERDISPLAY_H #include @@ -30,37 +32,41 @@ Purpose: This library standardizes interfaces to displays of many types. #include #endif -#if HYPERDISPLAY_USE_RAY_TRACING - #include "util/SparkFun_2DRayTracing.h" +#if HYPERDISPLAY_USE_RAY_TRACING + #include "util/SparkFun_2DRayTracing.h" #endif -#if HYPERDISPLAY_USE_PRINT // - #if HYPERDISPLAY_INCLUDE_DEFAULT_FONT - #if __has_include ( ) - #include "util/font5x7.h" - #define HYPERDISPLAY_DEFAULT_FONT_WIDTH 5 - #define HYPERDISPLAY_DEFAULT_FONT_HEIGHT 8 - #endif /* __has_include( "util/font5x7.h" ) */ +#if HYPERDISPLAY_USE_PRINT + #include + #include + + #if HYPERDISPLAY_INCLUDE_SMALL_FONT + #define HYPERDISPLAY_SMALL_FONT_WIDTH 5 + #define HYPERDISPLAY_SMALL_FONT_HEIGHT 8 + #endif + #if HYPERDISPLAY_INCLUDE_LARGE_FONT + #define HYPERDISPLAY_LARGE_FONT_WIDTH 8 + #define HYPERDISPLAY_LARGE_FONT_HEIGHT 17 #endif #endif template void swap(T* i1, T* i2){ - T s = *i1; - *i1 = *i2; - *i2 = s; + T s = *i1; + *i1 = *i2; + *i2 = s; } template T uabslen(T i1, T i2){ - if(i1 >= i2){ return i1-i2 + 1; } - else{ return i2-i1 + 1; } + if(i1 >= i2){ return i1-i2 + 1; } + else{ return i2-i1 + 1; } } typedef double hd_extent_t; -typedef uint16_t hd_hw_extent_t; // Represents the limit for the width of height of the display in pixels -typedef uint8_t hd_font_extent_t; // Represents the limiting value for width or height of font characters -typedef uint32_t hd_colors_t; // Represents the limiting value of how many colors can be stored inside a color cycle +typedef uint16_t hd_hw_extent_t; // Represents the limit for the width of height of the display in pixels +typedef uint8_t hd_font_extent_t; // Represents the limiting value for width or height of font characters +typedef uint32_t hd_colors_t; // Represents the limiting value of how many colors can be stored inside a color cycle typedef hd_colors_t hd_pixels_t; typedef void * color_t; @@ -71,34 +77,34 @@ const bool hdW = true; const bool hdH = false; typedef struct character_info{ - color_t data; // The data that is used to fill the character frame - hd_font_extent_t* xLoc; // x location data relative to the upper left-corner of the character area - hd_font_extent_t* yLoc; // y location data relative to the upper left-corner of the character area - hd_font_extent_t xDim; // The maximum value of xLoc - hd_font_extent_t yDim; // The maximum value of yLoc - also the number of pixels to move down for characters that cause new lines - hd_pixels_t numPixels; // The number of color_t types that pdata points to - bool show; // Whether or not to actually show the character - bool causesNewline; // This indicates if the given chracter is meant to cause a newline -}char_info_t; // Character information structure for placing pixels in a window + color_t data; // The data that is used to fill the character frame + hd_font_extent_t* xLoc; // x location data relative to the upper left-corner of the character area + hd_font_extent_t* yLoc; // y location data relative to the upper left-corner of the character area + hd_font_extent_t xDim; // The maximum value of xLoc + hd_font_extent_t yDim; // The maximum value of yLoc - also the number of pixels to move down for characters that cause new lines + hd_pixels_t numPixels; // The number of color_t types that pdata points to + bool show; // Whether or not to actually show the character + bool causesNewline; // This indicates if the given chracter is meant to cause a newline +}char_info_t; // Character information structure for placing pixels in a window typedef struct window_info{ - hd_hw_extent_t xMin; // FYI window min/max use the hardware frame of reference - hd_hw_extent_t xMax; // - hd_hw_extent_t yMin; // - hd_hw_extent_t yMax; // - hd_extent_t cursorX; // Where the cursor is currently in window-coordinates - hd_extent_t cursorY; // Where the cursor is currently in window-coordinates - hd_extent_t xReset; // Where the cursor goes on a reset location (window coordinates) - hd_extent_t yReset; // Where the cursor goes on a reset location (window coordinates) - char_info_t lastCharacter; // Information about the last character written. - color_t currentSequenceData; // The data that is used as the default color sequence - hd_colors_t currentColorCycleLength; // The default color sequence number of pixels - hd_colors_t currentColorOffset; // The current offset + hd_hw_extent_t xMin; // FYI window min/max use the hardware frame of reference + hd_hw_extent_t xMax; // + hd_hw_extent_t yMin; // + hd_hw_extent_t yMax; // + hd_extent_t cursorX; // Where the cursor is currently in window-coordinates + hd_extent_t cursorY; // Where the cursor is currently in window-coordinates + hd_extent_t xReset; // Where the cursor goes on a reset location (window coordinates) + hd_extent_t yReset; // Where the cursor goes on a reset location (window coordinates) + char_info_t lastCharacter; // Information about the last character written. + color_t currentSequenceData; // The data that is used as the default color sequence + hd_colors_t currentColorCycleLength; // The default color sequence number of pixels + hd_colors_t currentColorOffset; // The current offset bool bufferMode; // Indicates either buffer or direct mode (direct is default) color_t data; // A pointer to pixel data that is specific to the window. Can be left as NULL - hd_pixels_t numPixels; // The number of pixel types that data points to + hd_pixels_t numPixels; // The number of pixel types that data points to bool dynamic; // Indicator if the current buffer memory was dynamically allocated - so that it can be disposed of automatically -}wind_info_t; // Window infomation structure for placing objects on the display +}wind_info_t; // Window infomation structure for placing objects on the display typedef enum{ hyperdisplay_dim_ok = 0, @@ -112,49 +118,51 @@ extern char_info_t hyperdisplayDefaultCharacter; class hyperdisplay : public Print{ private: + static const unsigned char *fontsPointer[]; + protected: - hyperdisplay(uint16_t xSize, uint16_t ySize); // Constructor - used to make sure member parameters are setup correctly + hyperdisplay(uint16_t xSize, uint16_t ySize); // Constructor - used to make sure member parameters are setup correctly - // Utility functions - uint16_t getNewColorOffset(uint16_t colorCycleLength, uint16_t startColorOffset, int32_t numWritten); // Returns a valid offset for a given color sequence and number of pixels drawn - hyperdisplay_dim_check_t enforceHWLimits(hd_extent_t * windowvar, hd_hw_extent_t* hardwarevar, bool axisSelect); // Returns info about if a variable was within current window limits. Also applis the transformation from window to hardware coordinates to that variable - hyperdisplay_dim_check_t enforceSWLimits(hd_extent_t* windowvar, bool axisSelect); // Same job as HW limits except does not convert to hardware coordinates + // Utility functions + uint16_t getNewColorOffset(uint16_t colorCycleLength, uint16_t startColorOffset, int32_t numWritten); // Returns a valid offset for a given color sequence and number of pixels drawn + hyperdisplay_dim_check_t enforceHWLimits(hd_extent_t * windowvar, hd_hw_extent_t* hardwarevar, bool axisSelect); // Returns info about if a variable was within current window limits. Also applis the transformation from window to hardware coordinates to that variable + hyperdisplay_dim_check_t enforceSWLimits(hd_extent_t* windowvar, bool axisSelect); // Same job as HW limits except does not convert to hardware coordinates - #if HYPERDISPLAY_DRAWING_LEVEL > 0 - // Protected drawing functions - hd_extent_t lineHighNorm(hd_extent_t x0, hd_extent_t y0, hd_extent_t x1, hd_extent_t y1, uint16_t width, color_t data, hd_colors_t colorCycleLength, hd_colors_t startColorOffset); - hd_extent_t lineLowNorm(hd_extent_t x0, hd_extent_t y0, hd_extent_t x1, hd_extent_t y1, uint16_t width, color_t data, hd_colors_t colorCycleLength, hd_colors_t startColorOffset); - hd_extent_t lineHighReverse(hd_extent_t x0, hd_extent_t y0, hd_extent_t x1, hd_extent_t y1, uint16_t width, color_t data, hd_colors_t colorCycleLength, hd_colors_t startColorOffset); - hd_extent_t lineLowReverse(hd_extent_t x0, hd_extent_t y0, hd_extent_t x1, hd_extent_t y1, uint16_t width, color_t data, hd_colors_t colorCycleLength, hd_colors_t startColorOffset); - void circle_Bresenham(hd_extent_t x0, hd_extent_t y0, hd_extent_t radius, color_t color, bool fill); - void circle_midpoint(hd_extent_t x0, hd_extent_t y0, hd_extent_t radius, color_t color, bool fill); - void circle_eight(hd_extent_t xc, hd_extent_t yc, hd_extent_t dx, hd_extent_t dy, color_t color, bool fill); - #endif /* HYPERDISPLAY_DRAWING_LEVEL > 0 */ + #if HYPERDISPLAY_DRAWING_LEVEL > 0 + // Protected drawing functions + hd_extent_t lineHighNorm(hd_extent_t x0, hd_extent_t y0, hd_extent_t x1, hd_extent_t y1, uint16_t width, color_t data, hd_colors_t colorCycleLength, hd_colors_t startColorOffset); + hd_extent_t lineLowNorm(hd_extent_t x0, hd_extent_t y0, hd_extent_t x1, hd_extent_t y1, uint16_t width, color_t data, hd_colors_t colorCycleLength, hd_colors_t startColorOffset); + hd_extent_t lineHighReverse(hd_extent_t x0, hd_extent_t y0, hd_extent_t x1, hd_extent_t y1, uint16_t width, color_t data, hd_colors_t colorCycleLength, hd_colors_t startColorOffset); + hd_extent_t lineLowReverse(hd_extent_t x0, hd_extent_t y0, hd_extent_t x1, hd_extent_t y1, uint16_t width, color_t data, hd_colors_t colorCycleLength, hd_colors_t startColorOffset); + void circle_Bresenham(hd_extent_t x0, hd_extent_t y0, hd_extent_t radius, color_t color, bool fill); + void circle_midpoint(hd_extent_t x0, hd_extent_t y0, hd_extent_t radius, color_t color, bool fill); + void circle_eight(hd_extent_t xc, hd_extent_t yc, hd_extent_t dx, hd_extent_t dy, color_t color, bool fill); + #endif /* HYPERDISPLAY_DRAWING_LEVEL > 0 */ // Lowest level APIs // These functions are in hardware coordinates. The only one you need to implement is hwpixel, but you can implement the others if you have a more efficient way to do it // Furthermore when the high-level functions call these functions it will be guaranteed that the pixel locations respect the limits of the display // And additionally v0 will be always less than or equal to v1 (variables are provided in ascending order) - virtual void hwpixel(hd_hw_extent_t x0, hd_hw_extent_t y0, color_t data = NULL, hd_colors_t colorCycleLength = 1, hd_colors_t startColorOffset = 0) = 0; // Made a pure virtual function so that derived classes are forced to implement the pixel function + virtual void hwpixel(hd_hw_extent_t x0, hd_hw_extent_t y0, color_t data = NULL, hd_colors_t colorCycleLength = 1, hd_colors_t startColorOffset = 0) = 0; // Made a pure virtual function so that derived classes are forced to implement the pixel function virtual void hwxline(hd_hw_extent_t x0, hd_hw_extent_t y0, hd_hw_extent_t len, color_t data = NULL, hd_colors_t colorCycleLength = 1, hd_colors_t startColorOffset = 0, bool goLeft = false); // Default implementation provided, suggested to overwrite virtual void hwyline(hd_hw_extent_t x0, hd_hw_extent_t y0, hd_hw_extent_t len, color_t data = NULL, hd_colors_t colorCycleLength = 1, hd_colors_t startColorOffset = 0, bool goUp = false); // Default implementation provided, suggested to overwrite - virtual void hwrectangle(hd_hw_extent_t x0, hd_hw_extent_t y0, hd_hw_extent_t x1, hd_hw_extent_t y1, bool filled = false, color_t data = NULL, hd_colors_t colorCycleLength = 1, hd_colors_t startColorOffset = 0, bool reverseGradient = false, bool gradientVertical = false); - virtual void hwfillFromArray(hd_hw_extent_t x0, hd_hw_extent_t y0, hd_hw_extent_t x1, hd_hw_extent_t y1, color_t data = NULL, hd_pixels_t numPixels = 0, bool Vh = false ); // Default implementation provided, suggested to overwrite + virtual void hwrectangle(hd_hw_extent_t x0, hd_hw_extent_t y0, hd_hw_extent_t x1, hd_hw_extent_t y1, bool filled = false, color_t data = NULL, hd_colors_t colorCycleLength = 1, hd_colors_t startColorOffset = 0, bool reverseGradient = false, bool gradientVertical = false); + virtual void hwfillFromArray(hd_hw_extent_t x0, hd_hw_extent_t y0, hd_hw_extent_t x1, hd_hw_extent_t y1, color_t data = NULL, hd_pixels_t numPixels = 0, bool Vh = false ); // Default implementation provided, suggested to overwrite - // Buffer writing functions - all buffers areread left-to-right and top to bottom. Width and height are specified in the associated window's settings. Coordinates are window coordinates - hd_pixels_t wToPix( wind_info_t* wind, hd_hw_extent_t x0, hd_hw_extent_t y0); // Computes the pixel offset for a window-coordinate pair (multiply by bytes per pixel to get a byte offset) - void swpixel( hd_extent_t x0, hd_extent_t y0, color_t data = NULL, hd_colors_t colorCycleLength = 1, hd_colors_t startColorOffset = 0); - void swxline( hd_extent_t x0, hd_extent_t y0, hd_extent_t len, color_t data = NULL, hd_colors_t colorCycleLength = 1, hd_colors_t startColorOffset = 0, bool goLeft = false); - void swyline( hd_extent_t x0, hd_extent_t y0, hd_extent_t len, color_t data = NULL, hd_colors_t colorCycleLength = 1, hd_colors_t startColorOffset = 0, bool goUp = false); - void swrectangle( hd_extent_t x0, hd_extent_t y0, hd_extent_t x1, hd_extent_t y1, bool filled = false, color_t data = NULL, hd_colors_t colorCycleLength = 1, hd_colors_t startColorOffset = 0, bool reverseGradient = false, bool gradientVertical = false); - void swfillFromArray( hd_extent_t x0, hd_extent_t y0, hd_extent_t x1, hd_extent_t y1, color_t data = NULL, hd_pixels_t numPixels = 0, bool Vh = false ); + // Buffer writing functions - all buffers areread left-to-right and top to bottom. Width and height are specified in the associated window's settings. Coordinates are window coordinates + hd_pixels_t wToPix( wind_info_t* wind, hd_hw_extent_t x0, hd_hw_extent_t y0); // Computes the pixel offset for a window-coordinate pair (multiply by bytes per pixel to get a byte offset) + void swpixel( hd_extent_t x0, hd_extent_t y0, color_t data = NULL, hd_colors_t colorCycleLength = 1, hd_colors_t startColorOffset = 0); + void swxline( hd_extent_t x0, hd_extent_t y0, hd_extent_t len, color_t data = NULL, hd_colors_t colorCycleLength = 1, hd_colors_t startColorOffset = 0, bool goLeft = false); + void swyline( hd_extent_t x0, hd_extent_t y0, hd_extent_t len, color_t data = NULL, hd_colors_t colorCycleLength = 1, hd_colors_t startColorOffset = 0, bool goUp = false); + void swrectangle( hd_extent_t x0, hd_extent_t y0, hd_extent_t x1, hd_extent_t y1, bool filled = false, color_t data = NULL, hd_colors_t colorCycleLength = 1, hd_colors_t startColorOffset = 0, bool reverseGradient = false, bool gradientVertical = false); + void swfillFromArray( hd_extent_t x0, hd_extent_t y0, hd_extent_t x1, hd_extent_t y1, color_t data = NULL, hd_pixels_t numPixels = 0, bool Vh = false ); public: // Parameters - hd_hw_extent_t xExt, yExt; // The rectilinear extent of the display in two dimensions (number of pixels) - wind_info_t * pCurrentWindow; // A pointer to the active window information structure. + hd_hw_extent_t xExt, yExt; // The rectilinear extent of the display in two dimensions (number of pixels) + wind_info_t * pCurrentWindow; // A pointer to the active window information structure. // User-defined utilities virtual color_t getOffsetColor(color_t base, uint32_t numPixels) = 0; // This pure virtual function is required to get the correct pointer after incrementing by a number of pixels (which could have any amount of data behind them depending on how the color is stored) @@ -169,53 +177,53 @@ class hyperdisplay : public Print{ // hd_extent_t lHP( bool axisSelect, bool coordSelect = hdH, wind_info_t* ptowindow = NULL ); // Window Functions - void setWindowColorSequence(wind_info_t * wind, color_t data = NULL, hd_colors_t colorCycleLength = 1, hd_colors_t startColorOffset = 0); // Sets up a color sequence for the window - void setCurrentWindowColorSequence(color_t data = NULL, hd_colors_t colorCycleLength = 1, hd_colors_t startColorOffset = 0); // Sets up a color sequence for the current window + void setWindowColorSequence(wind_info_t * wind, color_t data = NULL, hd_colors_t colorCycleLength = 1, hd_colors_t startColorOffset = 0); // Sets up a color sequence for the window + void setCurrentWindowColorSequence(color_t data = NULL, hd_colors_t colorCycleLength = 1, hd_colors_t startColorOffset = 0); // Sets up a color sequence for the current window int setWindowMemory(wind_info_t * wind, color_t data = NULL, hd_pixels_t numPixels = 0, uint8_t bpp = 0, bool allowDynamic = false); int setCurrentWindowMemory( color_t data = NULL, hd_pixels_t numPixels = 0, uint8_t bpp = 0, bool allowDynamic = false); - // Buffer and Show + // Buffer and Show void buffer(wind_info_t * wind = NULL); // Puts the current window into buffer mode - drawing commands are performed on the current window's data buffer - if available void direct(wind_info_t * wind = NULL); // Cancels buffer mode. Drawing commands will go straight to display memory. Buffered data will remain and can still be shown later void show(wind_info_t * wind = NULL); // Outputs the current window's buffered data to the display // 'primitive' drawing functions - window coordinates - void pixel(hd_extent_t x0, hd_extent_t y0, color_t data = NULL, hd_colors_t colorCycleLength = 1, hd_colors_t startColorOffset = 0); - void xline(hd_extent_t x0, hd_extent_t y0, hd_extent_t len, color_t data = NULL, hd_colors_t colorCycleLength = 1, hd_colors_t startColorOffset = 0, bool goLeft = false); - void yline(hd_extent_t x0, hd_extent_t y0, hd_extent_t len, color_t data = NULL, hd_colors_t colorCycleLength = 1, hd_colors_t startColorOffset = 0, bool goUp = false); - void rectangle(hd_extent_t x0, hd_extent_t y0, hd_extent_t x1, hd_extent_t y1, bool filled = false, color_t data = NULL, hd_colors_t colorCycleLength = 1, hd_colors_t startColorOffset = 0, bool reverseGradient = false, bool gradientVertical = false); - void fillFromArray(hd_extent_t x0, hd_extent_t y0, hd_extent_t x1, hd_extent_t y1, color_t data = NULL, hd_pixels_t numPixels = 0, bool Vh = false); - void fillWindow(color_t color = NULL, hd_colors_t colorCycleLength = 1, hd_colors_t startColorOffset = 0); - - #if HYPERDISPLAY_DRAWING_LEVEL > 0 + void pixel(hd_extent_t x0, hd_extent_t y0, color_t data = NULL, hd_colors_t colorCycleLength = 1, hd_colors_t startColorOffset = 0); + void xline(hd_extent_t x0, hd_extent_t y0, hd_extent_t len, color_t data = NULL, hd_colors_t colorCycleLength = 1, hd_colors_t startColorOffset = 0, bool goLeft = false); + void yline(hd_extent_t x0, hd_extent_t y0, hd_extent_t len, color_t data = NULL, hd_colors_t colorCycleLength = 1, hd_colors_t startColorOffset = 0, bool goUp = false); + void rectangle(hd_extent_t x0, hd_extent_t y0, hd_extent_t x1, hd_extent_t y1, bool filled = false, color_t data = NULL, hd_colors_t colorCycleLength = 1, hd_colors_t startColorOffset = 0, bool reverseGradient = false, bool gradientVertical = false); + void fillFromArray(hd_extent_t x0, hd_extent_t y0, hd_extent_t x1, hd_extent_t y1, color_t data = NULL, hd_pixels_t numPixels = 0, bool Vh = false); + void fillWindow(color_t color = NULL, hd_colors_t colorCycleLength = 1, hd_colors_t startColorOffset = 0); + + #if HYPERDISPLAY_DRAWING_LEVEL > 0 // Level 1 drawing functions - window coordinates - uint16_t line(hd_extent_t x0, hd_extent_t y0, hd_extent_t x1, hd_extent_t y1, uint16_t width = 1, color_t data = NULL, hd_colors_t colorCycleLength = 1, hd_colors_t startColorOffset = 0, bool reverseGradient = false); - void polygon(hd_extent_t x[], hd_extent_t y[], uint8_t numSides, uint16_t width = 1, color_t data = NULL, hd_colors_t colorCycleLength = 1, hd_colors_t startColorOffset = 0, bool reverseGradient = false); - void circle(hd_extent_t x0, hd_extent_t y0, hd_extent_t radius, bool filled = false, color_t data = NULL, hd_colors_t colorCycleLength = 1, hd_colors_t startColorOffset = 0, bool reverseGradient = false); - #endif /* HYPERDISPLAY_DRAWING_LEVEL > 0 */ + uint16_t line(hd_extent_t x0, hd_extent_t y0, hd_extent_t x1, hd_extent_t y1, uint16_t width = 1, color_t data = NULL, hd_colors_t colorCycleLength = 1, hd_colors_t startColorOffset = 0, bool reverseGradient = false); + void polygon(hd_extent_t x[], hd_extent_t y[], uint8_t numSides, uint16_t width = 1, color_t data = NULL, hd_colors_t colorCycleLength = 1, hd_colors_t startColorOffset = 0, bool reverseGradient = false); + void circle(hd_extent_t x0, hd_extent_t y0, hd_extent_t radius, bool filled = false, color_t data = NULL, hd_colors_t colorCycleLength = 1, hd_colors_t startColorOffset = 0, bool reverseGradient = false); + #endif /* HYPERDISPLAY_DRAWING_LEVEL > 0 */ - #if HYPERDISPLAY_DRAWING_LEVEL > 1 - // void draw something complex; - #endif /* HYPERDISPLAY_DRAWING_LEVEL > 1 */ + #if HYPERDISPLAY_DRAWING_LEVEL > 1 + // void draw something complex; + #endif /* HYPERDISPLAY_DRAWING_LEVEL > 1 */ - #if HYPERDISPLAY_USE_RAY_TRACING - void filledPolygon(sf2drt_polygon* poly, uint16_t width = 1, bool filled = false, color_t data = NULL, hd_colors_t colorCycleLength = 1, hd_colors_t startColorOffset = 0, bool reverseGradient = false); - #endif /* HYPERDISPLAY_USE_RAYTRACING */ + #if HYPERDISPLAY_USE_RAY_TRACING + void filledPolygon(sf2drt_polygon* poly, uint16_t width = 1, bool filled = false, color_t data = NULL, hd_colors_t colorCycleLength = 1, hd_colors_t startColorOffset = 0, bool reverseGradient = false); + #endif /* HYPERDISPLAY_USE_RAYTRACING */ // Printing - virtual size_t write(uint8_t val); // This is the implementation of write that is inherited from print.h, left as virtual to be implementation specific - #if HYPERDISPLAY_USE_PRINT - virtual void getCharInfo(uint8_t character, char_info_t * pchar); // The pchar pointer argument points to a valid char_info_t object that the function must fill out with the right values - #endif /* HYPERDISPLAY_USE_PRINT */ + virtual size_t write(uint8_t val); // This is the implementation of write that is inherited from print.h, left as virtual to be implementation specific + #if HYPERDISPLAY_USE_PRINT + virtual void getCharInfo(uint8_t character, char_info_t * pchar); // The pchar pointer argument points to a valid char_info_t object that the function must fill out with the right values + #endif /* HYPERDISPLAY_USE_PRINT */ void setTextCursor(int32_t x0, int32_t y0, wind_info_t * window = NULL); void resetTextCursor(wind_info_t * window = NULL); // Mathematical drawing tools - #if HYPERDISPLAY_USE_MATH + #if HYPERDISPLAY_USE_MATH // Write math functions here - #endif /* HYPERDISPLAY_USE_MATH */ + #endif /* HYPERDISPLAY_USE_MATH */ }; // Some callback functions available to the user - they can be overriden with whatever implementation is useful at the time @@ -223,8 +231,8 @@ class hyperdisplay : public Print{ // and that if the user provides implementation specific versions of the other primitive functions then these callbacks will not be // called, so if the functionality is desired it can be re-implemented. void hyperdisplayXLineCallback(hd_hw_extent_t x0, hd_hw_extent_t y0, hd_hw_extent_t len, color_t data, hd_colors_t colorCycleLength, hd_colors_t startColorOffset, bool goLeft) __attribute__ ((weak)); -void hyperdisplayYLineCallback(hd_hw_extent_t x0, hd_hw_extent_t y0, hd_hw_extent_t len, color_t data, hd_colors_t colorCycleLength, hd_colors_t startColorOffset, bool goUp) __attribute__ ((weak)); -void hyperdisplayRectangleCallback(hd_hw_extent_t x0, hd_hw_extent_t y0, hd_hw_extent_t x1, hd_hw_extent_t y1, color_t data, bool filled, hd_colors_t colorCycleLength, hd_colors_t startColorOffset, bool gradientVertical, bool reverseGradient) __attribute__ ((weak)); +void hyperdisplayYLineCallback(hd_hw_extent_t x0, hd_hw_extent_t y0, hd_hw_extent_t len, color_t data, hd_colors_t colorCycleLength, hd_colors_t startColorOffset, bool goUp) __attribute__ ((weak)); +void hyperdisplayRectangleCallback(hd_hw_extent_t x0, hd_hw_extent_t y0, hd_hw_extent_t x1, hd_hw_extent_t y1, color_t data, bool filled, hd_colors_t colorCycleLength, hd_colors_t startColorOffset, bool gradientVertical, bool reverseGradient) __attribute__ ((weak)); void hyperdisplayFillFromArrayCallback(hd_hw_extent_t x0, hd_hw_extent_t y0, hd_hw_extent_t x1, hd_hw_extent_t y1, hd_pixels_t numPixels, color_t data) __attribute__ ((weak)); #endif /* HYPERDISPLAY_H */ diff --git a/src/util/font5x7.h b/src/util/font5x7.h index 2abdabb..a4c08f3 100644 --- a/src/util/font5x7.h +++ b/src/util/font5x7.h @@ -19,7 +19,7 @@ along with this program. If not, see . #ifndef FONT5X7_H #define FONT5X7_H -#include +// #include // Standard ASCII 5x7 font static const unsigned char font5x7[] PROGMEM = { diff --git a/src/util/font8x16.h b/src/util/font8x16.h new file mode 100644 index 0000000..5b0142d --- /dev/null +++ b/src/util/font8x16.h @@ -0,0 +1,120 @@ +/* + MicroView Arduino Library + Copyright (C) 2014 GeekAmmo + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ +#ifndef FONT8X16_H +#define FONT8X16_H + +// #include + +static const unsigned char font8x16[] PROGMEM = { + // first row defines - FONTWIDTH, FONTHEIGHT, ASCII START CHAR, TOTAL CHARACTERS, FONT MAP WIDTH HIGH, FONT MAP WIDTH LOW (2,56 meaning 256) + 8,16,32,96,2,56, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x0E, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0xD0, 0xBE, 0x90, 0xD0, 0xBE, 0x90, 0x00, + 0x00, 0x1C, 0x62, 0xFF, 0xC2, 0x80, 0x00, 0x00, 0x0C, 0x12, 0x92, 0x4C, 0xB0, 0x88, 0x06, 0x00, + 0x80, 0x7C, 0x62, 0xB2, 0x1C, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x0E, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xE0, 0x18, 0x04, 0x02, 0x02, 0x00, 0x00, 0x00, 0x02, 0x02, 0x04, 0x18, 0xE0, 0x00, 0x00, + 0x00, 0x24, 0x18, 0x7E, 0x18, 0x24, 0x00, 0x00, 0x80, 0x80, 0x80, 0xF0, 0x80, 0x80, 0x80, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x60, 0x18, 0x06, 0x00, 0x00, + 0xF8, 0x04, 0xC2, 0x32, 0x0C, 0xF8, 0x00, 0x00, 0x00, 0x04, 0x04, 0xFE, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x02, 0x82, 0x42, 0x22, 0x1C, 0x00, 0x00, 0x00, 0x02, 0x22, 0x22, 0x22, 0xDC, 0x00, 0x00, + 0xC0, 0xA0, 0x98, 0x84, 0xFE, 0x80, 0x80, 0x00, 0x00, 0x1E, 0x12, 0x12, 0x22, 0xC2, 0x00, 0x00, + 0xF8, 0x44, 0x22, 0x22, 0x22, 0xC0, 0x00, 0x00, 0x00, 0x02, 0x02, 0xC2, 0x32, 0x0A, 0x06, 0x00, + 0x00, 0x8C, 0x52, 0x22, 0x52, 0x8C, 0x00, 0x00, 0x3C, 0x42, 0x42, 0x42, 0x26, 0xF8, 0x00, 0x00, + 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, + 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, + 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x02, 0x82, 0x42, 0x22, 0x1C, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, + 0x00, 0x04, 0x04, 0x0F, 0x04, 0x03, 0x00, 0x00, 0x04, 0x02, 0x01, 0x03, 0x04, 0x04, 0x03, 0x00, + 0x03, 0x04, 0x04, 0x04, 0x05, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x03, 0x06, 0x08, 0x10, 0x10, 0x00, 0x00, 0x00, 0x10, 0x10, 0x08, 0x06, 0x03, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x16, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x03, 0x04, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, 0x04, 0x04, 0x07, 0x04, 0x04, 0x00, 0x00, + 0x00, 0x07, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, 0x00, 0x04, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, + 0x01, 0x02, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x03, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 0x00, 0x04, 0x04, 0x04, 0x02, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x0E, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x04, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, + 0x04, 0x02, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xF8, 0x04, 0x72, 0x8A, 0xFA, 0x84, 0x78, 0x00, 0x00, 0xC0, 0x38, 0x06, 0x38, 0xC0, 0x00, 0x00, + 0x00, 0xFE, 0x22, 0x22, 0x22, 0xDC, 0x00, 0x00, 0xF8, 0x04, 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, + 0xFE, 0x02, 0x02, 0x02, 0x04, 0xF8, 0x00, 0x00, 0x00, 0xFE, 0x22, 0x22, 0x22, 0x22, 0x00, 0x00, + 0x00, 0xFE, 0x22, 0x22, 0x22, 0x22, 0x00, 0x00, 0xF8, 0x04, 0x02, 0x02, 0x22, 0xE2, 0x00, 0x00, + 0xFE, 0x20, 0x20, 0x20, 0x20, 0xFE, 0x00, 0x00, 0x00, 0x02, 0x02, 0xFE, 0x02, 0x02, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x02, 0x02, 0xFE, 0x00, 0x00, 0xFE, 0x40, 0xB0, 0x08, 0x04, 0x02, 0x00, 0x00, + 0x00, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x0C, 0x70, 0x80, 0x70, 0x0C, 0xFE, 0x00, + 0xFE, 0x0C, 0x30, 0xC0, 0x00, 0xFE, 0x00, 0x00, 0xF8, 0x04, 0x02, 0x02, 0x04, 0xF8, 0x00, 0x00, + 0xFE, 0x42, 0x42, 0x42, 0x22, 0x1C, 0x00, 0x00, 0xF8, 0x04, 0x02, 0x02, 0x04, 0xF8, 0x00, 0x00, + 0x00, 0xFE, 0x42, 0x42, 0xA2, 0x1C, 0x00, 0x00, 0x00, 0x1C, 0x22, 0x42, 0x42, 0x80, 0x00, 0x00, + 0x02, 0x02, 0x02, 0xFE, 0x02, 0x02, 0x02, 0x00, 0xFE, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x00, 0x00, + 0x06, 0x38, 0xC0, 0x00, 0xC0, 0x38, 0x06, 0x00, 0x3E, 0xC0, 0xF0, 0x0E, 0xF0, 0xC0, 0x3E, 0x00, + 0x00, 0x06, 0x98, 0x60, 0x98, 0x06, 0x00, 0x00, 0x00, 0x06, 0x18, 0xE0, 0x18, 0x06, 0x00, 0x00, + 0x02, 0x02, 0xC2, 0x32, 0x0A, 0x06, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x02, 0x02, 0x02, 0x02, 0x00, + 0x00, 0x06, 0x18, 0x60, 0x80, 0x00, 0x00, 0x00, 0x02, 0x02, 0x02, 0x02, 0xFE, 0x00, 0x00, 0x00, + 0x40, 0x30, 0x0C, 0x0C, 0x30, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x02, 0x04, 0x04, 0x04, 0x00, 0x00, 0x00, 0x06, 0x01, 0x01, 0x01, 0x01, 0x01, 0x06, 0x00, + 0x00, 0x07, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, + 0x07, 0x04, 0x04, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, 0x07, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, + 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x04, 0x07, 0x00, 0x00, + 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x04, 0x04, 0x07, 0x04, 0x04, 0x00, 0x00, + 0x00, 0x04, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 0x07, 0x00, 0x00, 0x01, 0x02, 0x04, 0x00, 0x00, + 0x00, 0x07, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, 0x07, 0x00, 0x00, 0x01, 0x00, 0x00, 0x07, 0x00, + 0x07, 0x00, 0x00, 0x00, 0x03, 0x07, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x02, 0x01, 0x00, 0x00, + 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x0C, 0x12, 0x11, 0x10, 0x00, + 0x00, 0x07, 0x00, 0x00, 0x01, 0x06, 0x00, 0x00, 0x00, 0x04, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, + 0x00, 0x06, 0x01, 0x00, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, + 0x06, 0x05, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x10, 0x10, 0x10, 0x10, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x00, 0x10, 0x10, 0x10, 0x10, 0x1F, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x00, + 0x00, 0x00, 0x02, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x10, 0x10, 0x10, 0xF0, 0x00, 0x00, + 0x00, 0xFE, 0x20, 0x10, 0x10, 0xE0, 0x00, 0x00, 0x00, 0xE0, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, + 0x00, 0xE0, 0x10, 0x10, 0x10, 0xFE, 0x00, 0x00, 0x00, 0xE0, 0x90, 0x90, 0x90, 0xE0, 0x00, 0x00, + 0x00, 0x20, 0xFC, 0x22, 0x22, 0x22, 0x02, 0x00, 0x00, 0xE0, 0x10, 0x10, 0x10, 0xF0, 0x00, 0x00, + 0x00, 0xFE, 0x20, 0x10, 0x10, 0xE0, 0x00, 0x00, 0x10, 0x10, 0xF2, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x10, 0x10, 0x10, 0xF2, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x80, 0x40, 0x20, 0x10, 0x00, 0x00, + 0x00, 0x02, 0x02, 0xFE, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x20, 0x10, 0xF0, 0x20, 0x10, 0xF0, 0x00, + 0x00, 0xF0, 0x20, 0x10, 0x10, 0xE0, 0x00, 0x00, 0x00, 0xE0, 0x10, 0x10, 0x10, 0xE0, 0x00, 0x00, + 0x00, 0xF0, 0x20, 0x10, 0x10, 0xE0, 0x00, 0x00, 0x00, 0xE0, 0x10, 0x10, 0x10, 0xF0, 0x00, 0x00, + 0x00, 0xF0, 0x20, 0x10, 0x10, 0x70, 0x00, 0x00, 0x00, 0x60, 0x90, 0x90, 0x90, 0x20, 0x00, 0x00, + 0x00, 0x20, 0x20, 0xFC, 0x20, 0x20, 0x20, 0x00, 0x00, 0xF0, 0x00, 0x00, 0x00, 0xF0, 0x00, 0x00, + 0x00, 0x70, 0x80, 0x00, 0x80, 0x70, 0x00, 0x00, 0xF0, 0x00, 0xC0, 0x30, 0xC0, 0x00, 0xF0, 0x00, + 0x00, 0x30, 0xC0, 0xC0, 0x30, 0x00, 0x00, 0x00, 0x00, 0x30, 0xC0, 0x00, 0x80, 0x70, 0x00, 0x00, + 0x00, 0x10, 0x10, 0x90, 0x50, 0x30, 0x00, 0x00, 0x00, 0x80, 0x80, 0x7E, 0x02, 0x02, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x7E, 0x80, 0x80, 0x00, 0x00, + 0x00, 0x80, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x02, 0x07, 0x00, 0x00, + 0x00, 0x07, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, + 0x00, 0x03, 0x04, 0x04, 0x02, 0x07, 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, + 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x24, 0x24, 0x22, 0x1F, 0x00, 0x00, + 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, 0x04, 0x04, 0x00, 0x00, 0x00, + 0x20, 0x20, 0x20, 0x20, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x01, 0x02, 0x04, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x07, 0x04, 0x04, 0x00, 0x00, 0x07, 0x00, 0x00, 0x07, 0x00, 0x00, 0x07, 0x00, + 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, + 0x00, 0x3F, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x02, 0x3F, 0x00, 0x00, + 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x04, 0x00, 0x00, 0x03, 0x04, 0x04, 0x02, 0x07, 0x00, 0x00, + 0x00, 0x00, 0x03, 0x04, 0x03, 0x00, 0x00, 0x00, 0x01, 0x06, 0x01, 0x00, 0x01, 0x06, 0x01, 0x00, + 0x00, 0x06, 0x01, 0x01, 0x06, 0x00, 0x00, 0x00, 0x20, 0x20, 0x31, 0x0E, 0x03, 0x00, 0x00, 0x00, + 0x00, 0x06, 0x05, 0x04, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x10, 0x10, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x1F, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +}; +#endif diff --git a/src/util/fontlargenumber.h b/src/util/fontlargenumber.h new file mode 100644 index 0000000..482e6dd --- /dev/null +++ b/src/util/fontlargenumber.h @@ -0,0 +1,74 @@ +/* + MicroView Arduino Library + Copyright (C) 2014 GeekAmmo + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ +#ifndef FONTLARGENUMBER_H +#define FONTLARGENUMBER_H + +#include + +static const unsigned char fontlargenumber[] PROGMEM = { + // first row defines - FONTWIDTH, FONTHEIGHT, ASCII START CHAR, TOTAL CHARACTERS, FONT MAP WIDTH HIGH, FONT MAP WIDTH LOW (2,56 meaning 256) + 12,48,48,11,1,32, + 0x00, 0xC0, 0xF8, 0x7C, 0x3E, 0x3E, 0xFC, 0xF8, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xE0, + 0x78, 0xFE, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x7C, 0x3C, 0x3E, 0x3E, 0xFE, 0xFC, + 0xE0, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x3E, 0x3E, 0x3E, 0xFE, 0xF8, 0xC0, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFE, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xFE, 0x3E, + 0x3E, 0x3E, 0x3E, 0x3E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xF0, 0xFC, 0x3E, 0x3E, 0x3E, + 0xFC, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x3E, 0x3E, 0x3E, 0x3E, 0x3E, 0x3E, 0xFE, 0xFE, 0x00, 0x00, + 0x00, 0x00, 0xC0, 0xF8, 0xFE, 0x3E, 0x7E, 0xFC, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFC, + 0x7E, 0x3E, 0xFE, 0xF8, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xE0, 0xC0, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xF0, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0xF9, 0xFF, 0xFF, 0xF0, 0x00, 0x00, + 0x00, 0x00, 0x07, 0x03, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x1F, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xFC, + 0x7F, 0x03, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, + 0x00, 0xFE, 0xFF, 0x03, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x3F, 0x7F, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0xE0, 0xFF, 0x1F, 0x00, + 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFE, 0x1F, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xF8, + 0xFC, 0xFF, 0xC7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xFE, 0x3F, 0x03, 0x00, 0xFF, 0xFF, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x3F, 0x3E, 0x7E, 0xFC, 0xF8, 0xE0, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xFF, 0xFF, 0x80, 0xF0, 0x7C, 0x7C, 0xF8, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x80, 0xF8, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x9F, 0xFF, 0xF8, 0xFE, 0x1F, + 0x01, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xC0, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0xFF, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xC0, 0xFC, + 0x7F, 0x03, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFE, 0x0F, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0F, 0xFF, 0xF8, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0xE7, 0xE0, + 0xE0, 0xE0, 0xFF, 0xFF, 0xE0, 0xE0, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xFF, + 0xFE, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x03, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xF0, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xFC, 0x3F, + 0x03, 0x03, 0x1F, 0xFF, 0xFC, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x1F, 0x3E, 0x3E, 0x0F, 0x01, + 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0x00, 0xFC, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFE, 0x0F, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xFF, 0x7F, 0x00, 0x00, 0x00, + 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0xFF, 0xFF, 0x03, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xC0, 0xFF, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xFF, 0xFF, 0x80, 0x00, 0x00, 0x80, + 0xFF, 0x7F, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xFF, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xFF, 0xFF, 0x80, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x80, 0xFC, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x1F, 0x3F, 0x7C, 0x7C, 0x3F, 0x1F, 0x03, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x7C, 0x7C, 0x7C, 0x7F, 0x7F, 0x7C, 0x7C, 0x7C, 0x00, 0x00, 0x00, 0x7F, 0x7F, 0x7C, + 0x7C, 0x7C, 0x7C, 0x7C, 0x7C, 0x00, 0x00, 0x00, 0x00, 0x3F, 0x7E, 0x7C, 0x7C, 0x7E, 0x1F, 0x07, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x7F, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x1F, 0x3E, 0x7C, 0x7C, 0x3E, 0x1F, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x1F, + 0x7F, 0x7C, 0x7C, 0x3F, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x7F, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x1F, 0x3F, 0x7E, 0x7C, 0x7E, 0x3F, 0x1F, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x3E, 0x7C, 0x7C, 0x7E, 0x3F, 0x0F, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +}; +#endif \ No newline at end of file diff --git a/src/util/hyperdisplay_default_conf.h b/src/util/hyperdisplay_default_conf.h index 39a0aa6..0516e00 100644 --- a/src/util/hyperdisplay_default_conf.h +++ b/src/util/hyperdisplay_default_conf.h @@ -46,7 +46,14 @@ INCLUDE_DEFAULT_FONT 0 - don't include the default 5x7 program memory font (to save on program space) 1 - do include the default 5x7 program memory font (to NOT save on program space) */ -#define HYPERDISPLAY_INCLUDE_DEFAULT_FONT 1 +#define HYPERDISPLAY_INCLUDE_SMALL_FONT 0 + +/* +INCLUDE_ALTERNATIVE_FONT +0 - don't include the alternative 8x16 program memory font (to save on program space) +1 - do include the default 8x16 program memory font (to NOT save on program space) +*/ +#define HYPERDISPLAY_INCLUDE_LARGE_FONT 1 /* USE_MATH: