Torque

Forums

Forums

Guest  

Show or hide header
Welcome Guest, posting in this forum require registration.




Torque » Torque OBD ECU Scanner » Torque Discussion / Ideas » New: Plugin support(3rd party add-ons, PIDs, etc)

Pages: 1 2 3 4 [5] 6 7 8 9 10 11 12 13 14
Author Topic: New: Plugin support(3rd party add-ons, PIDs, etc)
sasha
Member
Posts: 121
Post Re: New: Plugin support (3rd party add-ons, PIDs, etc)
on: September 15, 2011 (GMT)

Quote from 540-S3 on September 15, 2011
NOTE: This board is painfully slow to load and scroll.

I would definitely be willing to pay for the shift light. To add my 2 cents, I would make the lights more like bars across the whole screen. If you look at some of the flashlight apps they have made good use of bright colors and flashing lights that really get your attention.

-Audie

Audie,

I’ve added 2 more ‘flashing’ modes: full screen and ‘bars’.

Before I figure out how to host, I can email you the .apk. Just need to learn/code the way to save preferences.

Let me know if you want to try it before that: alex.zxtt@gmail.com

Cheers,
.a

Just surviving, trying to avoid speeding tickets.

Try the Shift Lights for amazing Torque!
https://play.google.com/store/apps/details?id=com.alanco.ShiftLightsPro

sasha
Member
Posts: 121
Post Re: New: Plugin support (3rd party add-ons, PIDs, etc)
on: September 15, 2011 (GMT)

Quote from admin on September 15, 2011
Ah, you want to store the shift point in each profile

I’ll see what I can do for the next update. Don’t mind linking to the app if you host it somewhere (sf.net, google code might be useful), even a market version if you pay the to become a dev, you can then upload to the market (either free of paid)

EDIT: done. You’ll have the following in the next update this weekend/monday:

Fantastic! Thanks for implementing this. This way plug-ins may not need to implement their own prefs savings.

I’ll investigate the Google code option – I have another code/app I’ve been wanting to post (Outlook calendar to Google calendar sync), so this could be a good time to do this :)

Cheers,
.a

Just surviving, trying to avoid speeding tickets.

Try the Shift Lights for amazing Torque!
https://play.google.com/store/apps/details?id=com.alanco.ShiftLightsPro

ebigg2000
Member
Posts: 3
Post Re: New: Plugin support (3rd party add-ons, PIDs, etc)
on: September 15, 2011 (GMT)

Sasha, I would be very interested in your plugin, I was asking for this feature from Ian and he sent me the link for this thread.

For those that don’t understand the purpose of a shift light, its for drivers looking to get that extra 1/10 of a second out of their driving instead of out their car.

sasha
Member
Posts: 121
Post Re: New: Plugin support (3rd party add-ons, PIDs, etc)
on: September 15, 2011 (GMT)

Quote from ebigg2000 on September 15, 2011
Sasha, I would be very interested in your plugin, I was asking for this feature from Ian and he sent me the link for this thread.

For those that don’t understand the purpose of a shift light, its for drivers looking to get that extra 1/10 of a second out of their driving instead of out their car.

==================================

I can email it to you. It has some unpolished edges (like preferences and shift RPM are not stored). Also, I’ve only tried it on my Nexus One.

If interested, email alex.zxtt@gmail.com

No guarantees it will make anyone happy :)

Just surviving, trying to avoid speeding tickets.

Try the Shift Lights for amazing Torque!
https://play.google.com/store/apps/details?id=com.alanco.ShiftLightsPro

piemmm
Administrator
Posts: 6045
Post Re: New: Plugin support (3rd party add-ons, PIDs, etc)
on: September 25, 2011 (GMT)

Latest AIDL script is now uploaded (linked to in the first post on this thread) which is for the latest app update (1.5.12 at time of writing)

Hopefully you will find it useful!

The app also broadcasts intents on certain conditions, check the changelog for the intent ids (they should be pretty self-explanatory)

Have fun!

Ian

ju
Member
Posts: 2
Post Re: New: Plugin support (3rd party add-ons, PIDs, etc)
on: September 26, 2011 (GMT)

Hi

i just installed the plungin for the dial widgets … but i find the Swop keep scanning for OBD even after switching off the Bluetooth… can it be disabled ? As it’s draining the batteries very quickly…

cheers.

piemmm
Administrator
Posts: 6045
Post Re: New: Plugin support (3rd party add-ons, PIDs, etc)
on: September 26, 2011 (GMT)

Hi

The scanning doesn’t drain batteries, as it goes into sleep mode and only periodically checks for the bluetooth adapter (I’ve had a phone last well over a day with the widgets and torque running in the background) – a lot of work went into making it power efficient and sleep so it could be left running all the time :)

Are you still in range of the bluetooth adapter (is the icon the scanning icon, or does it have yellow bars indicating it has connected to the OBD adapter?)

I can add an option to not start torque automatically in the next update, however it’s designed to run all the time (and not consume any power) – using the same method as the bluetooth headset function in the handset. As long as you are not in range of the adapter, the phone will not consume any power

ju
Member
Posts: 2
Post Re: New: Plugin support (3rd party add-ons, PIDs, etc)
on: September 26, 2011 (GMT)

Thanks for the reply :)

I notice the icon is either simply OBD or the scanning icon most of the time… And in the status screen, it states retrying in 60 sec… i am running on Samsung GS2 so my battery life already pretty bad … i hadthe widgets on for 2 hours without any connections … coincidentally no activities within the 2 hours… battery drained 15%… but it could be my phone itself -_-“

piemmm
Administrator
Posts: 6045
Post Re: New: Plugin support (3rd party add-ons, PIDs, etc)
on: September 26, 2011 (GMT)

Okay, no problem

If you have the widgets showing GPS or accelerometer data, then the battery will drain (but if they are showing OBD data, then everything should sleep fine). All the displays should go to ‘sleep’ mode when the screen is turned off

Those two icons are good – that means the app will be sleeping properly. If a yellow or green icon was showing, then that means the app has connected and when that happens it will keep the phone awake (although if the screen is off it shouldn’t consume much power as it’s just maintaining a bluetooth connection).

If you have the main app screens open however (the main Torque app) then they do use the CPU a bit whilst animating the displays and making sure everything looks nice so you will see the app jump to near the top of the most used battery list in this state as the usage time starts adding up

There is a battery monitor in Andriod – go to System->About phone->Battery usage. Best way to see what app is using most battery is to reboot the phone afresh and leave it for an hour without touching it or turning the screen on. After that time go to the battery usage applet screen and you’ll then see what has been eating the battery with the screen off

If you are in a poor-coverage 3g/hspda area, then the phone radio might drain the battery as it tries hard to maintain a 3g data connection.

Ian

sasha
Member
Posts: 121
Post Re: New: Plugin support (3rd party add-ons, PIDs, etc)
on: September 26, 2011 (GMT)

Quote from admin on September 25, 2011

Have fun!

Ian

Will do, thanks Ian!

Just surviving, trying to avoid speeding tickets.

Try the Shift Lights for amazing Torque!
https://play.google.com/store/apps/details?id=com.alanco.ShiftLightsPro

sasha
Member
Posts: 121
Post Re: New: Plugin support (3rd party add-ons, PIDs, etc)
on: September 26, 2011 (GMT)

Quote from admin on September 25, 2011

The app also broadcasts intents on certain conditions, check the changelog for the intent ids (they should be pretty self-explanatory)

Have fun!

Ian

=======================================

Ian, I must be blind, but I don’t see the intents descriptions anywhere…

thanks,
.a

Just surviving, trying to avoid speeding tickets.

Try the Shift Lights for amazing Torque!
https://play.google.com/store/apps/details?id=com.alanco.ShiftLightsPro

piemmm
Administrator
Posts: 6045
Post Re: New: Plugin support (3rd party add-ons, PIDs, etc)
on: September 26, 2011 (GMT)

Hi, they’re:

Sent when Torque connects to the ECU and has finished setting things up:
org.prowl.torque.OBD_CONNECTED

Sent when disconnected from the ECU or it stops responding:
org.prowl.torque.OBD_DISCONNECTED

Sent when the user has changed the theme:
org.prowl.torque.THEME_CHANGED

Sent when Torque starts up(it might already be running in the background however):
org.prowl.torque.APP_LAUNCHED

Sent when Torque is quitting and terminating the process:
org.prowl.torque.APP_QUITTING

Sent when the user has changed the vehicle profile:
org.prowl.torque.PROFILE_CHANGED

You’ll need a broadcast listener for them, something like:

  BroadcastReceiver profileChangedReceiver = new BroadcastReceiver() {
               @Override
               public void onReceive(Context context, Intent intent) {

                  aMethodToLoadTheUpdatedProfile();

               }           
            };
            registerReceiver(profileChangedReceiver, new IntentFilter(Intents.PROFILE_CHANGED));

where Intents.PROFILE_CHANGED is basically “org.prowl.torque.PROFILE_CHANGED”, as straightforward as that

sasha
Member
Posts: 121
Post Re: New: Plugin support (3rd party add-ons, PIDs, etc)
on: September 26, 2011 (GMT)

Quote from admin on September 26, 2011

where Intents.PROFILE_CHANGED is basically “org.prowl.torque.PROFILE_CHANGED”, as straightforward as that

Thanks Ian!

Just surviving, trying to avoid speeding tickets.

Try the Shift Lights for amazing Torque!
https://play.google.com/store/apps/details?id=com.alanco.ShiftLightsPro

mrnorm
Member
Posts: 6
Post Re: New: Plugin support (3rd party add-ons, PIDs, etc)
on: October 7, 2011 (GMT)

Hi everyone,

I love making use of the plugin resources, thanks :)

Few things I noticed, they may be my fault though:

1) Trip MPG & Trip KPL don’t appear to be coming through on the PIDs in the wiki. Are they being populated? I’m getting data from everything else fine.

2) isEcuConnected() returns true when the ECU connects, but doesn’t reset to false after the ECU disconnects. Is that expected behavior?

3) My IDE isn’t letting me compile code with the broadcast receivers, because org.prowl.torque.OBD_DISCONNECTED doesn’t exist. Am I doing something wrong?

Thanks,
Oli :)

piemmm
Administrator
Posts: 6045
Post Re: New: Plugin support (3rd party add-ons, PIDs, etc)
on: October 7, 2011 (GMT)

You’ll need to reference the intents as strings, not as classes, ie:

 context.registerReceiver(themeChangedReceiver, new IntentFilter("org.prowl.torque.THEME_CHANGED"));

isConnected should be resetting to false after a disconnect. I’ll look at this for you. You should be able to listen to the intents as well:

   public static final String OBD_CONNECTED = "org.prowl.torque.OBD_CONNECTED";
   public static final String OBD_DISCONNECTED = "org.prowl.torque.OBD_DISCONNECTED";

Trip MPG/KPL are:

   public static final int EXTRA_TRIP_MPG      = 0xFF1205;
   public static final int EXTRA_TRIP_KPL      = 0xFF1206;

Hope this helps!

Ian

mrnorm
Member
Posts: 6
Post Re: New: Plugin support (3rd party add-ons, PIDs, etc)
on: October 7, 2011 (GMT)

Ah I see! Thanks for taking a look at that :) I’ll try and hook onto those intents from a string, to detect ECU disconnection for the time being, thanks :)

Hmm, thats odd.. Thats the key I have for those PIDs too. I’ve been converting them down to decimal (16716293 and 16716294) to match against what is returned in getListOfActivePids(), is that correct?

Oli

piemmm
Administrator
Posts: 6045
Post Re: New: Plugin support (3rd party add-ons, PIDs, etc)
on: October 7, 2011 (GMT)

Hi

Yes, they should be working – they won’t be present if the vehicle isn’t connected or doesn’t support MPG (Or you have the option selected in the OBD2 settings to /not/ calculate fuel/mpg). I’ll double-check this is working over the weekend

mrnorm
Member
Posts: 6
Post Re: New: Plugin support (3rd party add-ons, PIDs, etc)
on: October 7, 2011 (GMT)

Hmm, I did check that because I used to keep track of that in the logs from my trips. I turned off logging and real-time upload, would that have any effect on it?

Thanks,
Oli

piemmm
Administrator
Posts: 6045
Post Re: New: Plugin support (3rd party add-ons, PIDs, etc)
on: October 7, 2011 (GMT)

If it’s selected, then it’ll stop the MPG being calculated (and those PIDs will be empty) :-)

mrnorm
Member
Posts: 6
Post Re: New: Plugin support (3rd party add-ons, PIDs, etc)
on: October 7, 2011 (GMT)

I see, so it only calculates MPG if logging/upload is enabled? :S

Pages: 1 2 3 4 [5] 6 7 8 9 10 11 12 13 14
WP-Forum by: Fredrik Fahlstad, Version: 2.4
Page loaded in: 0.102 seconds.

  Follow me on twitter