NSPManager / NSPanelManager

Sonoff NSPanel custom firmware for responsive and intuitive use
https://nspanelmanager.com/
128 stars 10 forks source link

Wrong baud on some US panels #64

Closed tpanajott closed 11 months ago

tpanajott commented 11 months ago

Some newer US panels have the wrong baud set bu default and after the NSPanel Manager TFT is flashed it reverts back to 9600. Could we perhaps always set the baud to 115200 on the startup of the screen? I seem to recall a command to do that. Think the command is "baud" for temporary (ie. this boot) or "bauds" to permanently change it. I'm thinking "baud" would be enough.

cablesandcoffee commented 11 months ago

It's interesting cause in the Nextion Instruction Set it says that bauds has been lost on rare occasions:

baud bauds NextionBaud Rate Sets the Nextion Baud rate in bits-per-secondmin 2400, max 921600, default 9600 or user definedValid values are: 2400, 4800, 9600, 19200, 31250, 38400, 57600, and 115200, 230400, 250000, 256000, 512000, and 921600 Note: baud=38400 will set the current baud rate to 38400 using bauds=38400 will set the current baud rate to 38400 and save this to be new power on default baud rate, persisting until changed.Note: on rare occasions bauds has become lost. With the addition of the Editor Program.s feature, it is now recommended to specify your desired baud rate baud=9600 between declarations and before the page0 instruction and no longer recommending inserting bauds=9600 in the first page’s Preinitialization Event of the HMI.

But I agree it should be enough with setting "baud". I will put that in the program.s part of the TFT file.

tpanajott commented 11 months ago

That's very interesting because from the issue we were solving the EU panels worked fine but 2/2 US panels lost baud.

cablesandcoffee commented 11 months ago

Yes very strange. Well, as they say in Pistvakt. "Rot in de där nå mer". Okay, I've updated tft files now. Baud is set to 115200 every time screen starts.