Turbo3
Gold Member
Posts: 2011
Joined: Mon Jul 19, 2010 8:34 pm
Delivery Date: 12 May 2011
Leaf Number: 002191
Location: San Jose, CA

Re: iOS LeafSpy Pro Support

Wed Feb 18, 2015 11:34 am

Nubo wrote:All seemed to be working well last night. Tried the various screens including service screens. I had graphed a charge session for about 15 minutes or so. I saved the .csv, shut everything down, including closing the app. I downloaded the .csv via iTunes on my Mac.

This morning I got in the car and started the app. It came up briefly but there seemed to be a flash and I was returned to the iPhone home screen. I tapped the icon again and the same thing happened. I thought the app had crashed but it was still actually running in the background. I selected it from the running apps instead of the app icon, and it came up.

Most things seemed to be working, but the graph would not update. It is still showing last night's charge recording. Not sure how to erase the graph and start with a new one, or at least continue graphing new values. I see options in the settings pertaining to reset "manually","automatically", "drive and charge", etc... But I tried the different ones, turning the car on and off and the old graph remains and doesn't update. I left the app running as I drove this morning but the old graph remains unchanged. The text info on that screen does update the SOC and GIDs...

Now that I am not connected to the WiFi, I can close the app and restart it from the icon just fine.
The app does not run in the background. The app would need to request that feature and it does not. iOS just suspends the app when you tap the Home button and restarts it if you tap on the icon again. The app has no ability to close itself. That would be a violation of Apple rules and the app would not be approved for testing (with the one exception of a bug that crashed the app but then it would not be in the background/suspended mode). So I have no explanation for why after opening the app iOS put you back on the Home screen but only iOS and the user have that ability.

As for the charge graph, since it is only for charging it does not clear until the next time you start a charge which should be automatic. So when not charging you will always see the last charge graph. The next release will also automatically save the charge graph at the end of a charge.

What were you expecting to happen to the Charge graph while driving?

User avatar
Nubo
Posts: 5702
Joined: Fri May 28, 2010 11:01 am
Delivery Date: 31 Oct 2014
Location: Vallejo, CA

Re: iOS LeafSpy Pro Support

Wed Feb 18, 2015 12:21 pm

Turbo3 wrote: The app does not run in the background. The app would need to request that feature and it does not. iOS just suspends the app when you tap the Home button and restarts it if you tap on the icon again. The app has no ability to close itself. That would be a violation of Apple rules and the app would not be approved for testing (with the one exception of a bug that crashed the app but then it would not be in the background/suspended mode). So I have no explanation for why after opening the app iOS put you back on the Home screen but only iOS and the user have that ability.
I may have misused some terms. There are 2 ways to access an app. The first is tapping its icon. The other is by double-tapping the home button, which displays the list of apps that are already "running", for lack of a better word. I understand many of these are not actually executing code in the background. Not sure what the word is for this group of apps.

So the behavior of reverting to the home screen only happened when tapping the app icon, but not when selecting it from the "running list". There must be another name for that -- the "dock"? And the jump back to home screen only happened when I was connected to the OBD2 WiFi. I'll try it again this afternoon to see if it's consistent. Is there any other info you'd want if I see it continue to happen?
As for the charge graph, since it is only for charging it does not clear until the next time you start a charge which should be automatic. So when not charging you will always see the last charge graph. The next release will also automatically save the charge graph at the end of a charge.

What were you expecting to happen to the Charge graph while driving?
Thanks for the explanation. I thought it would continue graphing the SOC, GIDs and kW (as negative)... I didn't realize it was a charging-only graph.
I noticed you're still working with polymers.

Turbo3
Gold Member
Posts: 2011
Joined: Mon Jul 19, 2010 8:34 pm
Delivery Date: 12 May 2011
Leaf Number: 002191
Location: San Jose, CA

Re: iOS LeafSpy Pro Support

Wed Feb 18, 2015 1:16 pm

Nubo wrote:
Turbo3 wrote: The app does not run in the background. The app would need to request that feature and it does not. iOS just suspends the app when you tap the Home button and restarts it if you tap on the icon again. The app has no ability to close itself. That would be a violation of Apple rules and the app would not be approved for testing (with the one exception of a bug that crashed the app but then it would not be in the background/suspended mode). So I have no explanation for why after opening the app iOS put you back on the Home screen but only iOS and the user have that ability.
I may have misused some terms. There are 2 ways to access an app. The first is tapping its icon. The other is by double-tapping the home button, which displays the list of apps that are already "running", for lack of a better word. I understand many of these are not actually executing code in the background. Not sure what the word is for this group of apps.

So the behavior of reverting to the home screen only happened when tapping the app icon, but not when selecting it from the "running list". There must be another name for that -- the "dock"? And the jump back to home screen only happened when I was connected to the OBD2 WiFi. I'll try it again this afternoon to see if it's consistent. Is there any other info you'd want if I see it continue to happen?
Knowing if this is repeatable would be important.

An apps life is not under the developer's control. Starting, moving to background, moving to foreground and killing are all under the iOS and user's control. The app has no control over these events. The app is notified of them (except for killing) but that is it.

At this point I am not sure what can be done. Perhaps if additional reports come in like this we could see some pattern to them.

adspguy
Posts: 94
Joined: Tue Apr 10, 2012 1:12 pm
Delivery Date: 23 Apr 2012
Leaf Number: 018978
Location: Newton, MA

Re: iOS LeafSpy Pro Support

Wed Feb 18, 2015 4:03 pm

for what it is I haven't seen it do anything but go back to whatever screen I left it at, no matter how I launch it.

Turbo3
Gold Member
Posts: 2011
Joined: Mon Jul 19, 2010 8:34 pm
Delivery Date: 12 May 2011
Leaf Number: 002191
Location: San Jose, CA

Re: iOS LeafSpy Pro Support

Wed Feb 18, 2015 4:20 pm

I have just seen the "app closing right after it starts" problem on an iTouch running the current test release.

Does not matter if I tap the icon to start or double tap the Home button and tap the app screen image to start. After the app connects to the WiFi Adapter and sends the first couple of commends it then is sent to the background and you end up back on the home screen again.

What is interesting is the KiWi Adapter problem looks very similar. But you start on the LeafSpy Pro Settings screen in order to Register the WiFi SSID for the first time. When you exit the Settings menu the app sends the first couple of commands to the KiWi Adapter and then goes into the background. Exiting this way does not save the Registered SSID so you end up in an endless loop trying to get the SSID setup.

It will be a little tricky to debug in that normally I would go into debug mode on the compiler and trap the error. But the debugger connects through WiFi to the PC which means I can not connect WiFi to the OBDII adapter to create the conditions for the problem. Will need to think about this one for a while.

Interesting bug though...

User avatar
Nubo
Posts: 5702
Joined: Fri May 28, 2010 11:01 am
Delivery Date: 31 Oct 2014
Location: Vallejo, CA

Re: iOS LeafSpy Pro Support

Wed Feb 18, 2015 9:01 pm

I didn't run across the "app closing" problem this afternoon. The new wrinkle though was that the adapter was not broadcasting an SSID and I had to unplug and replug it, then everything worked fine.
I noticed you're still working with polymers.

Turbo3
Gold Member
Posts: 2011
Joined: Mon Jul 19, 2010 8:34 pm
Delivery Date: 12 May 2011
Leaf Number: 002191
Location: San Jose, CA

Re: iOS LeafSpy Pro Support

Thu Feb 19, 2015 12:22 am

I think I have a fix for the app closing problem.

After some additional testing tomorrow I will try to release a new test version.

epirali
Posts: 581
Joined: Wed Oct 09, 2013 10:15 am
Delivery Date: 08 Oct 2013
Leaf Number: 418541
Location: Maryland

Re: iOS LeafSpy Pro Support

Thu Feb 19, 2015 8:01 am

Turbo3 wrote:I think I have a fix for the app closing problem.

After some additional testing tomorrow I will try to release a new test version.
FWIW I ran into the same issue and the solution was to turn off wifi (do not allow connection), launch the app, then enable the wifi. This started with the app falling into the "stuck" state, where it was connected but no longer updating the values. That lead to the "crash on launch," which was resolved by the trick above. But still no update. I then tried setting the "current as ODB" again in settings and that restarted things.

Additionally I have noticed data glitches, if I am running the battery plot there are updates where the data is "garbled" or seems to be an amalgam of two frames of updates.

QueenBee
Posts: 1564
Joined: Sun Aug 08, 2010 5:14 pm
Delivery Date: 20 Jun 2011
Leaf Number: 2062
Location: Bellevue (Seattle), WA

Re: iOS LeafSpy Pro Support

Thu Feb 19, 2015 9:48 am

Things are working well. Very excited.

Are you automatically getting crash reports? I don't haven't anything I can reproduce but definitely have had it crash, where the app closes without my requesting it.

CWO4Mann
Gold Member
Posts: 461
Joined: Thu Jul 28, 2011 8:12 am
Delivery Date: 11 Dec 2011
Leaf Number: 1567
Location: Brentwood, TN
Contact: Facebook

Re: iOS LeafSpy Pro Support

Thu Feb 19, 2015 10:17 am

BooKittyLeaf wrote:Just got my Invite to the Beta & downloaded it.

I have been using Leaf Stat

LeafSpy opened right up & grabbed my OBD2 WiFi signal after about 10 sec initially. Now it grabs the WiFi right away when opened.

Works with the same WiFi settings as LeafStat and provides so much more info, as well a alarms for low tire pressure!
I can actually use them both without reseting anything

Excited to finally have it on ios - will report back after I paly around with it for a while.

What about the Bluetooth connectivity to the iPad? I've always found that the iPad is very picky about what it will discover and connect to using the BT capability.
Ira est potens et pertinax.
Study History - Know the Future
CWO4 US Army (Ret.)
N4CVX; ex-VP2EHF; ex-DA1BB; ex-KR6DEM
2012 SL Glacier Pearl VIN: 1567 Delivered 12-11-2011
Cool Springs Nissan, Franklin, TN

Return to “LEAF CANBus”