SmittyHalibut/EleksTubeHAX

Error on compiling

sheldonGordon opened this issue · 34 comments

Hello guy,

I have that error on compiling.

In file included from D:\EleksTubeHAX-main\EleksTubeHAX\GLOBAL_DEFINES.h:14:0,
from D:\EleksTubeHAX-main\EleksTubeHAX\ChipSelect.h:4,
from D:\EleksTubeHAX-main\EleksTubeHAX\ChipSelect.cpp:1:
C:\Users\aurelien\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.4\cores\esp32/Arduino.h:183:12: error: 'std::round' has not been declared
using std::round;
^
In file included from D:\EleksTubeHAX-main\EleksTubeHAX\GLOBAL_DEFINES.h:14:0,
from D:\EleksTubeHAX-main\EleksTubeHAX\Buttons.h:4,
from D:\EleksTubeHAX-main\EleksTubeHAX\Button.cpp:1:
C:\Users\aurelien\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.4\cores\esp32/Arduino.h:183:12: error: 'std::round' has not been declared
using std::round;
^
In file included from D:\EleksTubeHAX-main\EleksTubeHAX\GLOBAL_DEFINES.h:14:0,
from D:\EleksTubeHAX-main\EleksTubeHAX\Backlights.h:4,
from D:\EleksTubeHAX-main\EleksTubeHAX\Backlights.cpp:1:
C:\Users\aurelien\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.4\cores\esp32/Arduino.h:183:12: error: 'std::round' has not been declared
using std::round;
^
In file included from D:\EleksTubeHAX-main\EleksTubeHAX\GLOBAL_DEFINES.h:14:0,
from D:\EleksTubeHAX-main\EleksTubeHAX\Clock.h:5,
from D:\EleksTubeHAX-main\EleksTubeHAX\Clock.cpp:1:
C:\Users\aurelien\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.4\cores\esp32/Arduino.h:183:12: error: 'std::round' has not been declared
using std::round;
^
In file included from C:\Users\aurelien\AppData\Local\Temp\arduino-sketch-A90A66D64D900CF2FECB49B5F6C4D1C7\sketch\EleksTubeHAX.ino.cpp:1:0:
C:\Users\aurelien\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.4\cores\esp32/Arduino.h:183:12: error: 'std::round' has not been declared
using std::round;
^

exit status 1

Compilation error: exit status 1

Can you give me?

Hmm.. Last time I played with this was before Arduino 2.0 was released. Does that esp32/2.0.4/ in the paths mean you're using Arduino IDE 2.0?

It's saying it can't find std::round() which is being referenced in Arduino.h??!

It sounds like there's some incompatibility between the ESP32 support and your version of Arduino. Make sure you don't have any pending updates in your Boards or Libraries.

A quick grep confirms our code doesn't use std::round() anywhere.

This code is confirmed to work with Arduino 1.8.
From my quick experience with some other project I can confirm that Arduino 1.8 and 2.0 are not fully compatible, also ESP32 libraries were updated. For me the I2C port stopped working on 2.0 while everything was fine on 1.8.

I deleted all files on 2.0, I have reinstall on 1.8.13 and its OK.
Just i have a little other problem, my number display is horizontal instead of vertical.
Where it is possible to change that its code?
THX

Hm, so you have clock mounted vertically or you see rotated (and cropped) images?

I pushing the default images in data folder
And i have compiled with HARDWARE_SI_HAI_CLOCK

Interesting. The person I made SI-HAI version for originally, didn't report any such issues.
Probably there is a flag in the eTFT driver chip initialization function to set orientation. I am not too familiar with LCD driver chips. You can dig through eTFT libraries or Google and see if you can pinpoint how to rotate the screen.

IMG_20230110_114334498_HDR
The image is now in the right direction, but I do not understand the problem there

The "noise" on display is part of the integrated image buffer in the LCDs, that is not updated with image data. There must be something wrong between the library and display configuration. Either buffer size, or display dimensions, or something like that.

Are the colors okay? I think this font should be dark blue on black background, if you didn't change the pictures. if true, this points also to incorrect color mapping.

What did you change to rotate the images?

in TFTs.h i have just added setRotation(3) in line 40
void enableAllDisplays() { digitalWrite(TFT_ENABLE_PIN, HIGH); enabled = true; setRotation(3);}

Try to exchange display Length and Width values...

doesn't work that reboot all 3 secondes.
maybe the ST7789_DRIVER driver is not good for me?

Try to examine the LCD display, any text you can find on the display itself or orange flex cable is useful.
If display driver is wrong, displays will be completely black.
I don't have much experience with LCDs, try Arduino forums or Reddit...

You already tried all the things I was going to suggest. It does look like the rotation and resolution needs to be adjusted, but you already tried that. (I had that problem on a different display and library; still have an outstanding Pull Request for that change. )

But something else is going on with your images, because the area that's being drawn isn't square. If the rotation and resolutions are wrong/swapped, it'll CORRECTLY draw into the "upper left corner" area that's a square of the smaller dimension. And that's not happening for you.

Look at the "3" in both images you posted: they contain different amounts of the digit, and padding around the outside edges.

If I had to guess, your source files aren't the correct resolutions? Or aren't flagged as the correct bit-depth?

EleksTubeIPS_with_EleksTubeHAX
I have a similar problem with:
EleksTubeIPS Docker v6.1.11
Arduino 1.8.19
NTPClient by Fabrice Weinberg (v3.2.0)
Adafruit NeoPixel by Adafruit (v1.8.0)
DS1307RTC by Paul Stoffregen (v1.4.1) *other developer?
TFT_eSPI by Bodmer (v2.3.61)
Time by Paul Stoffregen (v1.6.0) *other developer?
PubSubClient by Nick O'Leary (v2.8.0)
ArduinoJson by Benoit Blanchon (6.19.4)

Please write down all the details and text you can find on the LCD panels, including on or below the orange flat cable (unplug the FFC connector on the backside).

EleksTube IPS
NFP114H-03AF

nothing else? like starting with "ST"?
This is the only reference I was able to find: IPS 1.14 Inch 135RGBX240 TFT ST7789 8 pin SPI HD 262k FP-114H01A LCD
Looks like the defines for the build are okay. Maybe some small details are not correct for this display type... Or for the start you can try to lower the SPI clock frequency if it helps.

I also looked at another LCD. No, unfortunately nothing more.

When I press the keys, text appears in the lower area, this is only half-readable from the right, the orientation seems to be wrong.

i have a reference for LCD is "hd114001 XH"
@GHDESON you create a backup of the original firmware?

Yes, I have made a backup of the firmware.

have you tried your backup?
if it works i would like to get it back please

Is the ST7789V2, 8Pin, 135x240 data helpful for troubleshooting the half and rotated display?

i think i will change the screens with those on alibaba

I wouldn't do that, it's exactly those that create the problem with the half and rotated displays for me.

I have a similar problem with:
EleksTubeIPS Docker v6.1.11
Arduino 1.8.19
NTPClient by Fabrice Weinberg (v3.2.0)
Adafruit NeoPixel by Adafruit (v1.8.0)
DS1307RTC by Paul Stoffregen (v1.4.1) *other developer?
TFT_eSPI by Bodmer (v2.3.61)
Time by Paul Stoffregen (v1.6.0) *other developer?
PubSubClient by Nick O'Leary (v2.8.0)
ArduinoJson by Benoit Blanchon (6.19.4)

I wasn't able to even get the code to compile on Arduino IDE 1.8.19 and the library versions in the readme. I've submitted a PR (#50) with updates to the code. These updates allow for compiling with ESP32 2.0.X, the latest available libraries, and IDE 1.8.19.

If you're still interested, you can try my fork and see if anything improves.

hi @bitrot-alpha, I just tried with your changes. unfortunately that doesn't work either.
Thanks for your help though

For those still looking for a solution to this, I have the following clock EleksTubeIPS Docker v6.1.11 and also had the glitchy screen thing.

In order to fix it, I juste had to edit the library file User_Setup_Select.h of TFT_eSPI library and REMOVE the line #include <User_Setup.h>

The file should only have the include to GLOBAL_DEFINES.h inside the #ifndef USER_SETUP_LOADED ... #endif block.

I had a very hard time to have a working firmware on this, first because the actual master branch does not compile and I had to use @bitrot-alpha fork (thank you by the way), and second because SPIFFS upload tool is just not working on arduino 2.X and had to revert to arduino 1.8, then this....

To be honest the README says that you should add the include to the project Global defines, it says nothing about removing the previous one in place.

True, Arduino IDE 2 does not work correctly. Version 1.8 must be used.

Fixed in my fork. Will be merged into this repo a bit later.