Fix LCD lib to compile under gcc 8
parent
34e873a3f7
commit
edee2ad363
|
@ -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)
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue