fix warnings with const char* and file bool op

This commit is contained in:
hathach 2021-05-26 23:03:24 +07:00
parent e158a3312b
commit b052948961
No known key found for this signature in database
GPG key ID: 2FA891220FBFD581
7 changed files with 8 additions and 8 deletions

View file

@ -103,7 +103,7 @@ void loop() {
}
void testdrawtext(char *text, uint16_t color) {
void testdrawtext(const char *text, uint16_t color) {
display.setCursor(0, 0);
display.setTextColor(color);
display.setTextWrap(true);

View file

@ -84,7 +84,7 @@ void loop() {
}
void testdrawtext(char *text, uint16_t color) {
void testdrawtext(const char *text, uint16_t color) {
display.setCursor(0, 0);
display.setTextColor(color);
display.setTextWrap(true);

View file

@ -91,7 +91,7 @@ void loop() {
}
void testdrawtext(char *text, uint16_t color) {
void testdrawtext(const char *text, uint16_t color) {
display.setCursor(0, 0);
display.setTextColor(color);
display.setTextWrap(true);

View file

@ -101,7 +101,7 @@ void loop() {
}
void testdrawtext(char *text, uint16_t color) {
void testdrawtext(const char *text, uint16_t color) {
display.setCursor(0, 0);
display.setTextColor(color);
display.setTextWrap(true);

View file

@ -96,7 +96,7 @@ void loop() {
}
void testdrawtext(char *text, uint16_t color) {
void testdrawtext(const char *text, uint16_t color) {
display.setCursor(0, 0);
display.setTextColor(color);
display.setTextWrap(true);

View file

@ -81,7 +81,7 @@ void loop() {
#define BUFFPIXEL 20
bool bmpDraw(char *filename, int16_t x, int16_t y) {
bool bmpDraw(const char *filename, int16_t x, int16_t y) {
File bmpFile;
int bmpWidth, bmpHeight; // W+H in pixels
uint8_t bmpDepth; // Bit depth (currently must be 24)
@ -103,7 +103,7 @@ bool bmpDraw(char *filename, int16_t x, int16_t y) {
Serial.println('\'');
// Open requested file on SD card
if ((bmpFile = fatfs.open(filename, FILE_READ)) == NULL) {
if ((bmpFile = fatfs.open(filename, FILE_READ)) == false) {
Serial.print(F("File not found"));
return false;
}

View file

@ -158,7 +158,7 @@ void testlines(uint16_t color) {
display.display();
}
void testdrawtext(char *text, uint16_t color) {
void testdrawtext(const char *text, uint16_t color) {
display.clearBuffer();
display.setCursor(5, 5);
display.setTextColor(color);