My old code used the following construct:
cxgZ and cygZ are int16_t. It worked fine until recently. Now I am getting a warning that there is a problem.
If I look up the method it seems there are two of them with the same name, but differing number of arguments.
What is the recommended way of getting this to work again? newstr was just a dummy so I'd be able to fill the rectangle.
Boy updated libs & IDE is a bugger. Shouldn't have done that... Changing 12 things at once - what a terrible idea.
Code:
uint16_t x1, y1, w, h;
oldZval = Zval;
String newstr = "XXXXXXXXXXXX";
tft.setFont(DroidSansMono_18);
tft.setTextColor(ILI9341_GREEN, thisGREY);
tft.getTextBounds(newstr, cxgZ, cygZ, &x1, &y1, &w, &h);
tft.fillRect(x1, y1-1, w, h+1, thisGREY);
cxgZ and cygZ are int16_t. It worked fine until recently. Now I am getting a warning that there is a problem.
Code:
/home/bruce/Arduino/ELS_IDE2/DRO.ino: In function 'void updateZ()':
/home/bruce/Arduino/ELS_IDE2/DRO.ino:23:43: warning: invalid conversion from 'uint16_t*' {aka 'short unsigned int*'} to 'int16_t*' {aka 'short int*'} [-fpermissive]
23 | tft.getTextBounds(newstr, cxgZ, cygZ, &x1, &y1, &w, &h);
| ^~~
| |
| uint16_t* {aka short unsigned int*}
If I look up the method it seems there are two of them with the same name, but differing number of arguments.
Code:
void getTextBounds(const uint8_t *buffer, uint16_t len, int16_t x, int16_t y, int16_t *x1, int16_t *y1, uint16_t *w, uint16_t *h);
void getTextBounds(const char *string, int16_t x, int16_t y, int16_t *x1, int16_t *y1, uint16_t *w, uint16_t *h);
What is the recommended way of getting this to work again? newstr was just a dummy so I'd be able to fill the rectangle.
Boy updated libs & IDE is a bugger. Shouldn't have done that... Changing 12 things at once - what a terrible idea.