marcfager / nspanel-mf

Custom HMI controlled by ESPHome for the Sonoff NSPanel. Includes media player card and home screen with weather data and clock. More to come.
215 stars 60 forks source link

Touch Hotspot are not in the correct position #29

Open trunneml opened 2 years ago

trunneml commented 2 years ago

Hi,

I tried to modify the HMI file but when I open it with the Nextion Editor (v1.63.3) the Touch Hotspots are not in the corrected place.

grafik

Is that intended?

trunneml commented 2 years ago

I found out that the panel has an offset and the m0..m11 are a workaround. Adding lcd_dev fffb 0002 0000 0020 into the setup code fixes the offset problem for me.

//The following code is only run once when power on, and is generally used for global variable definition and power on initialization data
int sys0=0,sys1=0,sys2=0,swipex=0,swipey=0,swipec=0,swipec2=0,swipedx=100,swipedy=100     //At present, the definition of global variable only supports 4-byte signed integer (int), and other types of global quantity declaration are not supported. If you want to use string type, you can use variable control in the page to implement
wup=4 // Wake-up page 4
lcd_dev fffb 0002 0000 0020
page Connecting                         //Power on start page 0