Author Topic: SimbleForMobile  (Read 179 times)

AKotowski

  • RFduino Jr. Member
  • **
  • Posts: 22
  • Karma: +0/-0
    • View Profile
SimbleForMobile
« on: September 14, 2017, 10:16:37 AM »
I would like to see SFM be more robust with respect to user errors.  Currently SFM locks up for many conditions without any clue as to what is wrong.  I have learned:

1.) Dont call   SimbleeForMobile.process() too often
2.) Dont update screen elements when the phone is not connected
3.) Dont update screen elements for a screen that is no longer being displayed
4.) Elements drawn after   SimbleeForMobile.endScreen() may not display

Thanks

A Kotowski




RFD_Nelson

  • RFduino Team
  • *****
  • Posts: 43
  • Karma: +0/-0
    • View Profile
Re: SimbleForMobile
« Reply #1 on: September 19, 2017, 07:48:11 AM »
Hi AKotowski,

Due to the nature of Simblee for Mobile's architecture, the app relies on the Simblee device and application to send it the correct messages. Should something be called out of turn, Simblee for Mobile is unaware that this condition is actually an error. It is up to the application on the Simblee device to relay the correct messages at the right time.

However, if you have questions about best practices, be sure to ask, and we'll be happy to help!

For instance:

1. The SimbleeForMobile.process() call should be only be used once in the loop() function.
2. SimbleeForMobile.updatable() should always be used before updating screen elements.
3. Elements that are not displayed should not be updated and you should use SimbleeForMobile.updatable() before making any screen updates.
4. Anything after SimbleeForMobile.endScreen() may not be shown and also will not be cached, so you want to draw your objects then update them after the SimbleeForMobile.endScreen().

Thanks,

Nelson