You are not logged in - Log in
Sign up for our newsletter! 
Home Dashboards Forum Tools Help Contact Us

Author Topic: Reset button  (Read 13735 times)

Offline Yoitstmac

  • Newbie
  • *
  • Posts: 23
    • View Profile
Reset button
« on: September 04, 2015, 11:16:34 pm »
I've downloaded other gauges and I can't figure out how to reset the parameter for anything, more specifically a trip value (Fuel used in trip A). How do I do this? In some I see scripts but to my understanding you can't use scripts in DashXL. I've tried a few combinations of object properties but none seem to work. Can anyone help?

Offline Nak

  • Newbie
  • *
  • Posts: 28
    • View Profile
Re: Reset button
« Reply #1 on: September 05, 2015, 12:48:17 am »
You can reset the entire trip. Look at any dashboard that has a reset feature. Here's my current dashboard. Tapping "A MPG" resets the trip that is associated with. Tapping the trip odometer resets that trip.

Offline Yoitstmac

  • Newbie
  • *
  • Posts: 23
    • View Profile
Re: Reset button
« Reply #2 on: September 05, 2015, 01:46:23 am »
You can reset the entire trip. Look at any dashboard that has a reset feature. Here's my current dashboard. Tapping "A MPG" resets the trip that is associated with. Tapping the trip odometer resets that trip.

I'm studying your gauge intensively and I don't understand how they reset. I'm looking at the button commands and they seem like scripts. I don't understand how these work and I can't find any information on them. How do I reword the commands to reset different PID's?

Offline Nak

  • Newbie
  • *
  • Posts: 28
    • View Profile
Re: Reset button
« Reply #3 on: September 05, 2015, 05:58:02 am »
Unfortunately, I haven't found too much documentation either. First thing you need to do is go over all of the information in the "Help" tab at the top of this page. Then you need to study a specific part of an existing dashboard to figure out how to do things.

The way the reset buttons work is this: First you create the button object on the main page. Then use a "State Tracker" to define the button inside of your dashboard. If you look at my dashboard, before you edit the dashboard, you'll see the button objects defined on that main page near the bottom. Then edit the dashboard, and look in the "Buttons" container in the foreground. (I've grouped all of the buttons in one container.) Note that the Object IDs have to match from the button definition on the main page and where you define the button in the foreground.

As far as resetting different PIDs, I don't know where that documentation can be found. What I do is look at a variety of dashboards to find what I need. The Tuxedo dashboards have a bit of everything. If you can't find it there, post a question about the specific PID you need. The mods are pretty busy, so you need to already understand how to structure what you need. If you post a general question like "How do I do this?" they aren't likely to be able to help, as it would take too much time. If, on the other hand you've already created the basics and just need a specific command to make a button or such work, then they are pretty helpful.

Offline Yoitstmac

  • Newbie
  • *
  • Posts: 23
    • View Profile
Re: Reset button
« Reply #4 on: September 06, 2015, 09:38:27 am »
I may head to admins then. I've spent hours and hours trying to make this gauge reset. I can't even use your commands from your gauge because my ScanXL application just instantly resets the "ClearScriptPidStateDataValues" to "ClearPidStateDataValues." I'm not sure what the difference is entirely, but it's enough to make my button not work. If a moderator won't respond, then I'll have to give up.

Offline Nak

  • Newbie
  • *
  • Posts: 28
    • View Profile
Re: Reset button
« Reply #5 on: September 07, 2015, 02:09:41 am »
If you post your dashboard here and tell me exactly what you're trying to do and which object you're unable to modify, I'll take a look at it. I'm not promising anything, but I can look anyways...

Offline Yoitstmac

  • Newbie
  • *
  • Posts: 23
    • View Profile
Re: Reset button
« Reply #6 on: September 07, 2015, 07:28:54 pm »
This is my gauge without all it's flashiness. I'm trying to make it so the fuel gauge can reset, but I'd to know what you do with it so I can do it on my own with other PID's in the future

Offline Nak

  • Newbie
  • *
  • Posts: 28
    • View Profile
Re: Reset button
« Reply #7 on: September 08, 2015, 01:35:03 am »
I'll look at this tomorrow for sure. So, you don't want fuel level remaining, you want fuel used on your gas gauge?

Offline Yoitstmac

  • Newbie
  • *
  • Posts: 23
    • View Profile
Re: Reset button
« Reply #8 on: September 08, 2015, 01:39:19 am »
Yes. I already have the PID set on the gauge the reset button is attached to. My BMW E46 doesn't support any fuel reading PIDS whatsoever. My workaround is knowing I how much gas I put in my tank, and then seeing how much I burn, and then reset it as I get close to burning the amount I've put in my car in trip A. I want to reset trip A so I can add a odometer in the future.

Offline Nak

  • Newbie
  • *
  • Posts: 28
    • View Profile
Re: Reset button
« Reply #9 on: September 08, 2015, 06:34:41 am »
You've got a few issues here. Right off the bat your Object IDs don't match. First you create the button; you've done that. Then the state tracker in the dashboard must have the same object ID. That's how DashCommand knows which button it is. That's the big thing missing here. I haven't tried to run this dashboard; there really should be some errors pop up due to the object IDs.

I haven't looked in depth at the rest; I'll do that tomorrow. There's a bit I'd change and clean up. I'll do the one button and clean it up, then tell you what I did. I'll attach my revision. That should get you on the right track.


Offline Yoitstmac

  • Newbie
  • *
  • Posts: 23
    • View Profile
Re: Reset button
« Reply #10 on: September 08, 2015, 04:34:06 pm »
oh okay. Yeah, there may be some bigger issues then, because I use a state tracker to cycle through multiple gauges on the side, so therefore the fuel button would reset all of the needles under that state tracker? That wouldn't be a bad thing, every other PID comes from the car, and therefore a reset wouldn't disrupt anything

Offline Nak

  • Newbie
  • *
  • Posts: 28
    • View Profile
Re: Reset button
« Reply #11 on: September 10, 2015, 02:59:54 am »
No, you need a separate state tracker to activate the button. You can then use another state tracker to cycle through gauges and hide/unhide buttons. You define a button on the main page, before you edit the dash. You then use a state tracker inside the dash to activate and locate the button. The state tracker and the defined button MUST have the same object ID.

I did some work on your dash, but couldn't really take the time to fully clean it up. You have offsets on different things which makes it very difficult to move one object to another layer. It also makes creating needles and such more difficult. Take a round gauge. If you have consistent position definition you can create a circle in the background and then give the needle in the foreground the same center. Now the needle is centered in your round gauge. Easy. I cleaned it up a bit to show you what could be done. Here's my observations, take them for what it's worth.

I disabled your background and foreground dashboards. They're unused, so leaving them enabled just slows things down.

I changed the organization of your dashboard. Numerous layers like you were using will slow things down, at least I believe that is the case. I organized things in to two layers, Background and Foreground. The background is where you want things that don't change, or only change with user action. Stuff you don't want redrawn constantly. (The more you redraw, the slower the dash.) Never put anything PID based in the background. Pictures, tickmarks, gauge faces, button graphics, these all go in the background.The foreground is where you want things that move or change: needles, PID based text... The more you have in the foreground, the slower the dash.

I moved the center circle of your tach needle to the background. This way it doesn't have to be redrawn constantly. I got rid of most of your needle rectangles and used lines. Much easier and quicker. Rectangles are positioned by their center. Lines are positioned by their ends. Define the start of the line as the same position as the center of the gauge. If you've used consistent positioning definition, you just type in the same coordinates as your gauge center. Then place the end of the line wherever your gauge zeroes out. If you want to shorten the line, just re-position the start wherever you want, you'll have the original line to guide you. Easy and quick. Your method of putting the components of a needle in to a container was good if you're going to go with a complicated needle. That way you can move the container if you need to move the needle around.

Using the "Pen" feature of an object in the foreground slows down your dash. I took it off your rounded rectangle in your tach needle just to show what it would be like cleaned up. If you like the look you can always use it, but check to see how much it's slowing you down.

Your reset button needed a complete re-do. Look at what I've done with it. The elements are there that you need. I put the button graphic in the background. You can use a state tracker in the background to make it visible/invisible. You can do the same with the button I put in the foreground. Note the button in the foreground is a state tracker. The "Not depressed" state has a transparent ellipse over your button graphic. It is the transparent ellipse that defines the position of the button. The button graphic is merely a way for the user to see where to press. You don't even need the button graphic. The "Depressed" State has an identical ellipse, except has an opacity of 128. This gives a visual confirmation that the button has been depressed. (Don't use opacity in the foreground except for stuff like this. Opacity slows down the dashboard if it is in the foreground.)

I didn't test this dashboard, it still needs work. Your original button could not have worked, this is a functional button. You still need to make sure the commands work though. I'm not sure what difference the word "Script" makes in the command. It changes easily though. I'm not sure why you were having problems with that? Maybe the file was read only, or you didn't hit "Enter" after typing the command?

Anyways, this should get you on the right track. No need to incorporate anything I did, other than the button. I was just playing around with it to see what could be done to clean it up.

Offline Yoitstmac

  • Newbie
  • *
  • Posts: 23
    • View Profile
Re: Reset button
« Reply #12 on: September 11, 2015, 05:08:00 pm »
Sorry for the long gap in replies, I've been busy with school. Wow, you've been a wealth of information and I appreciate everything more than I can even tell you. A few things. First, I had the top of my needle in a third layer due to the way the final design is. From what I know, the gauge will only slow down if the extra layers have to be re-rendered due to new data coming up like a needle. As in I could have 5 background gauges that won't slow down my gauge as long as only one has to refresh needles and such.
As for the rounded rectangle, you'll see why I use it in my final design which I'll post here in the next couple days. If you think having my entire needle could be more efficient as an image, let me know! All my gauge designs originally start as Photoshop documents.
The reset button I fully understand now. You were telling me earlier about state trackers but I just didn't understand their true purpose since I used them to just cycle through gauges or backgrounds and stuff like that. The version you uploaded didn't include the word "script," and it worked, so I think the program just uses them interchangeably to do the same thing. And yes, the reason it wouldn't add the word is because I didn't hit enter. I know, the price I pay for being a mac user d:
Other than that, I think this puts me in a place where I can upload the first version of my gauge I've been so excited to bring to others. All my gauges up to this point have been mimicked, and this one is all my own design, very exciting!

My only question for you is how did you know that ppe_trip_a is the command to reset trip A? If it were me, I'd think CALC.TRIP.A, but that isn't the case.

Again, thanks for everything, can't wait to show you the final product I'll have to offer

Offline Nak

  • Newbie
  • *
  • Posts: 28
    • View Profile
Re: Reset button
« Reply #13 on: September 12, 2015, 07:39:46 pm »
No, the only reason I guess to use just two layers is organization, but whatever makes sense to you is what works. I thought more layers was slower, but I looked in the Tuxedo dashboard, and it has multiple layers. Just remember, any time anything in a layer changes, the entire layer has to redraw. Keeping all of the PID driven things in the foreground and all the static stuff behind that is best.

Yeah, as far as speed, if you get the response you need then you're good. I was just pointing out possible changes if your dash ended up needing to speed up later.

I found all of the commands by looking at other dashboards, particularly the Tuxedo dashboard. (The DashCommand guys write that one, so I figure it's a pretty good source...)

Glad I could help! It helped me too, as I learned a bit more playing around with your dash. :)

Offline Yoitstmac

  • Newbie
  • *
  • Posts: 23
    • View Profile
Re: Reset button
« Reply #14 on: September 13, 2015, 05:37:12 pm »
No I appreciate it all, truly :) If you'd like to see the final product, it can be found here: http://www.dashxl.net/dashboard.php?dashboard=1268

I'm pretty sure I've gotten all the kinks out!!! Always nice when I can get things right the first time

 

Home | Dashboards | Forum | Help | Contact Us | Terms of Service
Powered by Palmer Performance
Copyright © 2021 Palmer Performance Engineering, Inc. All Rights Reserved.