Fix LCD lib to compile under gcc 8

pull/6/head
me-no-dev 2018-11-29 11:22:26 +01:00
parent 34e873a3f7
commit edee2ad363
3 changed files with 3 additions and 3 deletions

View File

@ -32,7 +32,7 @@ POSSIBILITY OF SUCH DAMAGE.
*/
#include "Adafruit_GFX.h"
#include "glcdfont.c"
#include "glcdfont.h"
#ifdef __AVR__
#include <avr/pgmspace.h>
#elif defined(ESP8266) || defined(ESP32)

View File

@ -551,7 +551,7 @@ int CEspLcd::drawStringSevSeg(const char *string, uint16_t poX, uint16_t poY, ui
int CEspLcd::drawNumberSevSeg(int long_num, uint16_t poX, uint16_t poY, uint8_t size)
{
char tmp[10];
char tmp[12];
if (long_num < 0) {
snprintf(tmp, sizeof(tmp), "%d", long_num);
} else {
@ -619,7 +619,7 @@ int CEspLcd::drawString(const char *string, uint16_t x, uint16_t y)
int CEspLcd::drawNumber(int long_num, uint16_t poX, uint16_t poY)
{
char tmp[10];
char tmp[12];
if (long_num < 0) {
snprintf(tmp, sizeof(tmp), "%d", long_num);
} else {