Page 16 of 49 FirstFirst ... 67891011121314151617181920212223242526 ... LastLast
Results 151 to 160 of 485
Like Tree2Likes

Thread: OBDMPG - MPG OBDII Plugin for RR 6-12-09

  1. #151
    Variable Bitrate
    Join Date
    Dec 2004
    Location
    Miami, FL
    Posts
    441
    Quote Originally Posted by mezz64 View Post
    The "sample skin" is just the skin files needed to add obdmpg to the carwings skin. Its not a separate skin, you need to copy those files into an existing carwings installation for them to work.

    It's separate so those who just want the new release do not have to download the skin again when it hasn't change at all.
    Absolutely right.

    I copied the files I to the Skin folder and it works perfectly. So great that someone finally got obd working. Even streetdeck doesn't work for me with the obd hardware THEY sold me.
    A car without turbo is a car with perpetual lag.

    My Ride
    My New Page

  2. #152
    Constant Bitrate aperali's Avatar
    Join Date
    Aug 2007
    Location
    Rio de Janeiro, Brazil
    Posts
    170
    Quote Originally Posted by aperali View Post
    Mezz,

    Ive not tryed the new release yet (Im on travelling - eating some sweet foods on my mother's house!). But, Ive noticed on the road that all my availables PIDs were being read fine, but the FEs labels wasnt being calculated, they were showing only "0". I tryed to reset the obdmpg; and filled the tank and adjusted the fuel. What could be causing this behavior?
    I found the answare. In the obdmpg.ini the ADJ was = to 0. I setted it to 1 and they started to show some values. But, they were about 3 times below the normal FE (in my case ~10km/L and it shows ) for my car.
    Remember Im using MAF.

    Quote Originally Posted by mezz64
    This is actually only implemented via the Volumetric Efficiency number at the moment since I think the MAF calculation is fairly accurate without adjustment. So at the moment that variable in the ini is not being used.
    Then, I think MAF caculation is using the ADJ thing. Do you know why the instant FE is showing something between 0 to 15km/L; and the Average ~ 2km/L? or what could be the value to be used on ADJ?

    Also I arrived right now from my travell which tooks about 3hours and while I was parking the car appered a error message on screen showing "obdmpg overflow error 6" with a OK button. I pressed it and RR was shutdown.

  3. #153
    Variable Bitrate
    Auto Apps:loading...
    mezz64's Avatar
    Join Date
    Nov 2004
    Location
    PA
    Posts
    379
    Blog Entries
    1
    Quote Originally Posted by aperali View Post
    I found the answare. In the obdmpg.ini the ADJ was = to 0. I setted it to 1 and they started to show some values. But, they were about 3 times below the normal FE (in my case ~10km/L and it shows ) for my car.
    Remember Im using MAF.



    Then, I think MAF caculation is using the ADJ thing. Do you know why the instant FE is showing something between 0 to 15km/L; and the Average ~ 2km/L? or what could be the value to be used on ADJ?

    Also I arrived right now from my travell which tooks about 3hours and while I was parking the car appered a error message on screen showing "obdmpg overflow error 6" with a OK button. I pressed it and RR was shutdown.
    The new release 1.2, no longer uses the ADJ number. Only the VE when a MAF is not present. You are using 1.1 right? There have been a number of changes in 1.2, including improved calculations.

    As to the overflow error, I am aware of this and am still working on the best solution. The next release will more than likely have a band-aid style solution, which is just to start collecting data in a new variable when the current one gets close to maxing out. This will add a few more lines into the ini to store the values.

    Another option would be to make the calculations less often but i'm pretty sure everybody would rather have an increase in speed rather than a decrease.

  4. #154
    Constant Bitrate aperali's Avatar
    Join Date
    Aug 2007
    Location
    Rio de Janeiro, Brazil
    Posts
    170
    Yes, you're right. Im using the old one. I'd like to remain in the old one cause the km/l FE units. But, no problem I'll upgrade to the newest tomorrow and report back here.
    Thanks for the answare,
    Alex

  5. #155
    Constant Bitrate tom_rosenback's Avatar
    Join Date
    Oct 2006
    Location
    Finland
    Posts
    170

    Post

    For the maxing out issue you could use a ring buffer and a sum variable. Let me try to explain.

    1. Create an array of a selected size, lets say size 20 for example
    2. Create a variable that calculates the sum.
    3. Create help variables
    4. Start looping and calculating.

    Code:
    int sizeOfBuf = 20;
    double[] insfe_buf = new double[sizeOfBuf];
    double insfe_sum = 0;
    double fe_avg = 0;
    int bufCnt = 0;
    int avg_divisor = 1;
    bool firstBufLoop = true;
    
    while(true)
    {
    insfe_sum -= insfe_buf[bufCnt]; // remove oldest insfe value from sum insfe_buf[buffCnt] = insfe; // add newest insfe insfe_sum += insfe_buf[bufCnt]; // add newest insfe to sum bufCnt = (bufCnt + 1) % sizeOfBuf; // Do the increment 0..19 (0..sizeOfBuf) if(firstBufLoop) {
    if(bufCnt < sizeOfBuf - 1) {
    avg_divisor = bufCnt + 1;
    } else {
    avg_divisor = sizeOfBuf; firstBufLoop = false;
    }
    } fe_avg = insfe_sum / avg_divisor;
    }
    In this way you always have for example a X minute average, no problem with maxing out some variable. Please ask if there was something unclear in my code. The code here is written in C but there should be no problem to change it to VB.

  6. #156
    Mo' Programming Mo' Problems
    Auto Apps:loading...
    Sonicxtacy02's Avatar
    Join Date
    Sep 2004
    Location
    Woodbridge, VA
    Posts
    8,166
    Blog Entries
    52
    Quote Originally Posted by tom_rosenback View Post
    For the maxing out issue you could use a ring buffer and a sum variable. Let me try to explain.

    1. Create an array of a selected size, lets say size 20 for example
    2. Create a variable that calculates the sum.
    3. Create help variables
    4. Start looping and calculating.

    Code:
    int sizeOfBuf = 20;
    double[] insfe_buf = new double[sizeOfBuf];
    double insfe_sum = 0;
    double fe_avg = 0;
    int bufCnt = 0;
    int avg_divisor = 1;
    bool firstBufLoop = true;
    
    while(true)
    {
    insfe_sum -= insfe_buf[bufCnt]; // remove oldest insfe value from sum insfe_buf[buffCnt] = insfe; // add newest insfe insfe_sum += insfe_buf[bufCnt]; // add newest insfe to sum bufCnt = (bufCnt + 1) % sizeOfBuf; // Do the increment 0..19 (0..sizeOfBuf) if(firstBufLoop) {
    if(bufCnt < sizeOfBuf - 1) {
    avg_divisor = bufCnt + 1;
    } else {
    avg_divisor = sizeOfBuf; firstBufLoop = false;
    }
    } fe_avg = insfe_sum / avg_divisor;
    }
    In this way you always have for example a X minute average, no problem with maxing out some variable. Please ask if there was something unclear in my code. The code here is written in C but there should be no problem to change it to VB.
    http://www.developerfusion.com/tools.../csharp-to-vb/

    here's the tool i use to convert c# to .net. Works great.
    mp3Car.com Senior Tech Blogger (Want a product reviewed? Contact me.)
    Find my plugins on the MP3Car App Store!
    Follow Me on Twitter or Facebook
    Live mp3Car Facebook Chat

  7. #157
    Variable Bitrate
    Auto Apps:loading...
    mezz64's Avatar
    Join Date
    Nov 2004
    Location
    PA
    Posts
    379
    Blog Entries
    1
    Thanks for the example Tom.

    That would work great if I only wanted to implement a X minute average, and I actually think I will be implementing that as an adjustable extra feature. However I would still like to retain the overall tank average that is causing me problems. The only thing is once I actually did the math I'm not sure where the problem is coming from.

    The way I figure it, assume someone is achieving a consistent 30mpg. This number gets calculated every 250ms and added to a sum. This means that after and hour of driving the sum would be at 432000. Assuming a 16gal tank size @ 30mpg one could possibly drive for 480 miles until they run out of gas. At an average speed of 65mph they would be on the road for 7.38 hours. This would produce a total sum variable of 3190153.84. This is certainly not too big for a double data type.

    EDIT:
    Never mind all those calculations above! The answer was quite simple actually. I'm not exceeding the variable on the sum its happening on the count! An integer can only hold up to 32767. On the above scenario the count would reach 106338 and hence produce an overflow error. A switch to a long should fix the problem.

    EDIT#2:
    I'm running a test on the new code now. I've got about 356 virtual miles to go, i'll report back once I arrive at my destination. If all is well i'll release the fixed code as a 1.2.1 update until I get some of the other features implemented.

  8. #158
    Constant Bitrate aperali's Avatar
    Join Date
    Aug 2007
    Location
    Rio de Janeiro, Brazil
    Posts
    170
    Quote Originally Posted by aperali View Post
    Yes, you're right. Im using the old one. I'd like to remain in the old one cause the km/l FE units. But, no problem I'll upgrade to the newest tomorrow and report back here.
    Thanks for the answare,
    Alex
    Upgraded. But, seems not working with my OBD2 interface. I think its max baud rate is 9600. Tryed scantool with 38400 but it isnt work either.
    Could you provide a new version with an option to 9600 speed, please?

  9. #159
    Super Moderator
    Auto Apps:loading...
    JohnWPB's Avatar
    Join Date
    Sep 2005
    Location
    West Palm Beach, Florida
    Posts
    4,700
    Blog Entries
    1
    Quote Originally Posted by mezz64 View Post
    I'm not exceeding the variable on the sum its happening on the count! An integer can only hold up to 32767.

    Hahahah! I feel your pain! I re-scanned my music using BlueZX3's RRMedia database, and it kept bombing out on me. I spent hours and hours trying to debug, uninstall & reinstall, and track down the problem! Talking with blue, we went back and forth, and finally figured it out.

    As it turns out, The 200 or so songs I had just added, put the music database over the 32767 count!
    Front End of Choice: Ride Runner (Is there anything else??? ) & Powered by the DFX5.1 Skin Available in the Mobile App Mart

    My Fiero Build Thread

  10. #160
    Variable Bitrate
    Auto Apps:loading...
    mezz64's Avatar
    Join Date
    Nov 2004
    Location
    PA
    Posts
    379
    Blog Entries
    1
    Unfortunately that didn't seem to fix the problem. I started it around 2ish and came back at 6 to see the overflow error again. I'm going to run another simulation tonight and try to monitor it more closely. I'm still fairly certain that i'm not maxing out the double with the sum so it must be something else.

    EDIT:
    Just realized I left one of the time counter variables as an integer. I switched it to a long and am monitoring the count and the sum as they increase. Hopefully its fixed.

Similar Threads

  1. Is there a OBDII BMV2 RR plugin?
    By Dave One in forum Engine Management, OBD-II, Engine Diagnostics, etc.
    Replies: 13
    Last Post: 10-02-2009, 11:25 AM
  2. OBDII / Elm MPG meter. Almost working but not quite!
    By stevieg in forum Engine Management, OBD-II, Engine Diagnostics, etc.
    Replies: 105
    Last Post: 08-19-2008, 03:24 AM
  3. pc reboot on sd startup
    By duanes7 in forum StreetDeck
    Replies: 3
    Last Post: 12-14-2007, 08:55 AM
  4. IRMAN plugin
    By knyarko in forum StreetDeck
    Replies: 3
    Last Post: 01-05-2007, 08:26 PM
  5. OBDII plugin (KL/KKL) ?
    By SyNTaXer in forum CF Plugins
    Replies: 6
    Last Post: 07-28-2006, 05:59 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •