mysensors / MySensors

MySensors library and examples
https://www.mysensors.org
1.32k stars 895 forks source link

Splash screen not redirected to MY_DEBUGDEVICE #1057

Open tekka007 opened 6 years ago

tekka007 commented 6 years ago

See forum: https://forum.mysensors.org/topic/8989/splash_screen-with-my_debugdevice

nelsonov commented 6 years ago

I have a fix for this. It's only a couple lines in MySplashScreen.cpp. However, in working on this I uncovered something related. displaySplashScreen is called before the sketch's setup(). If someone is using a soft serial port, that port will not be started until after the splash screen is displayed. This makes the splash screen disappear into a black hole.

Should I start a PR for this issue, #1057, as originally stated?

Should I create a separate issue for the problem of the order of displaySplashScreen and setup()?

tbowmo commented 6 years ago

I would prefer to separate issues, if they are not related in any way.

man. 8. okt. 2018 04.33 skrev Lee Nelson notifications@github.com:

I have a fix for this. It's only a couple lines in MySplashScreen.cpp. However, in working on this I uncovered something related. displaySplashScreen is called before the sketch's setup(). If someone is using a soft serial port, that port will not be started until after the splash screen is displayed. This makes the splash screen disappear into a black hole.

Should I start a PR for this issue, #1057 https://github.com/mysensors/MySensors/issues/1057, as originally stated?

Should I create a separate issue for the problem of the order of displaySplashScreen and setup()?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mysensors/MySensors/issues/1057#issuecomment-427708913, or mute the thread https://github.com/notifications/unsubscribe-auth/AFDzbSs7nXCH2zNzyAcyZQmF1ilZ1vVVks5uirmAgaJpZM4R9Rpo .

nelsonov commented 6 years ago

As noted in #1207 , if using a software serial device as MY_DEBUGDEVICE, then it needs to initialized in preHwInit() for the splash screen to work. Later functions like before() and setup() happen after the splash screen has already been displayed.

void preHwInit()
{
  SoftSerial.begin(9600);
}