It is currently Fri May 25, 2018 3:19 am



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 100 posts ]  Go to page Previous  1, 2, 3, 4  Next
Author Message
 Post subject: Re: Standardizing the math
PostPosted: Mon Jun 17, 2013 9:49 am 
Offline
User avatar

Joined: Sat May 11, 2013 9:45 am
Posts: 729
Location: PA, USA
What I MESS I just got merging Clint's branch into mine.....I'll need a bit or time to sort this out it looks like


Top
 Profile  
 
 Post subject: Re: Standardizing the math
PostPosted: Mon Jun 17, 2013 12:17 pm 
Offline
User avatar

Joined: Thu May 30, 2013 1:11 am
Posts: 54
It looks like we are good to go now. Thanks for the help Mark!

Now the fun part begins of digging through this and verifying how the value from the function is being used and how to modify that to use floats instead.


Top
 Profile  
 
 Post subject: Re: Standardizing the math
PostPosted: Mon Jun 17, 2013 12:19 pm 
Offline
User avatar

Joined: Thu May 30, 2013 1:11 am
Posts: 54
mk e wrote:
What I MESS I just got merging Clint's branch into mine.....I'll need a bit or time to sort this out it looks like


I was afraid of that! Between what you were changing and what I was changing, it definitely had LOTS of opportunities to really suck!


Top
 Profile  
 
 Post subject: Re: Standardizing the math
PostPosted: Mon Jun 17, 2013 2:41 pm 
Offline
User avatar

Joined: Sat May 11, 2013 9:45 am
Posts: 729
Location: PA, USA
clcorbin wrote:
mk e wrote:
What I MESS I just got merging Clint's branch into mine.....I'll need a bit or time to sort this out it looks like


I was afraid of that! Between what you were changing and what I was changing, it definitely had LOTS of opportunities to really suck!


Yup...there is a lot to be said for a lock and change vs everyone can change version system :)

I THINK I got it sorted out and pushed the combined file to mark_5634


Top
 Profile  
 
 Post subject: Re: Standardizing the math
PostPosted: Mon Jun 17, 2013 3:00 pm 
Offline
User avatar

Joined: Sat May 11, 2013 9:45 am
Posts: 729
Location: PA, USA
mk e wrote:

I THINK I got it sorted out and pushed the combined file to mark_5634


Nope...still finding stuff....I hate git.


Top
 Profile  
 
 Post subject: Re: Standardizing the math
PostPosted: Tue Jun 18, 2013 2:55 pm 
Offline
User avatar

Joined: Sat May 11, 2013 9:45 am
Posts: 729
Location: PA, USA
I got through clearing compile errors from the conversion to float.........now there are 53 linking errors to sort out :o


Top
 Profile  
 
 Post subject: Re: Standardizing the math
PostPosted: Tue Jun 18, 2013 3:10 pm 
Offline
User avatar

Joined: Sat May 11, 2013 9:45 am
Posts: 729
Location: PA, USA
mk e wrote:
I got through clearing compile errors from the conversion to float.........now there are 53 linking errors to sort out :o


Found it...it was just me being dumb as usual.


Top
 Profile  
 
 Post subject: Re: Standardizing the math
PostPosted: Thu Jun 20, 2013 11:05 am 
Offline
User avatar

Joined: Sat May 11, 2013 9:45 am
Posts: 729
Location: PA, USA
I think this is ready to start testing now.....except that TS isn't fully ready for the floats.

I guess I'll need to see about re-casting the output block to a form TS can read for now.


Top
 Profile  
 
 Post subject: Re: Standardizing the math
PostPosted: Thu Jun 20, 2013 4:03 pm 
Offline
User avatar

Joined: Sat May 11, 2013 9:45 am
Posts: 729
Location: PA, USA
mk e wrote:
I guess I'll need to see about re-casting the output block to a form TS can read for now.


I've got this setup for the basic stuff and the FW is running again now using the floats then converting to integer to pass the real time values to TS. Good progress I think.


I have NOT tested anything that uses lookups yet though....that's next.


Top
 Profile  
 
 Post subject: Re: Standardizing the math
PostPosted: Fri Jun 21, 2013 4:02 pm 
Offline
User avatar

Joined: Sat May 11, 2013 9:45 am
Posts: 729
Location: PA, USA
it's getting there.

The voltages convert properly.

Phil says he'll add floats to the output block in the next beta release.

The kicked now is the lookup is returning A value which is good....just not the right value.


Top
 Profile  
 
 Post subject: Re: Standardizing the math
PostPosted: Mon Jun 24, 2013 10:54 am 
Offline
User avatar

Joined: Thu May 30, 2013 1:11 am
Posts: 54
There is definitely a problem with the (x,y)->(row,col) conversion. I have that fixed on my version, but I am having trouble testing things that I am currently working through.


Top
 Profile  
 
 Post subject: Re: Standardizing the math
PostPosted: Tue Jun 25, 2013 11:00 am 
Offline
User avatar

Joined: Sat May 11, 2013 9:45 am
Posts: 729
Location: PA, USA
Beta tester Jack is back from vacation and ready to test so now the pressure is on!


Top
 Profile  
 
 Post subject: Re: Standardizing the math
PostPosted: Mon Jul 01, 2013 7:18 am 
Offline
User avatar

Joined: Sat May 11, 2013 9:45 am
Posts: 729
Location: PA, USA
Quick update.

Clint has been pretty busy on the lookup and it's pretty close now.....just a couple more "wait, TS sends it to us how? type questions :)


Top
 Profile  
 
 Post subject: Re: Standardizing the math
PostPosted: Mon Jul 01, 2013 10:43 am 
Offline
User avatar

Joined: Thu May 30, 2013 1:11 am
Posts: 54
I'm practicing the "1 step forward, 2 steps backward" method. I decided that debugging that function via the TRK board was going to be PAINFUL, so I decided to copy the function into a simple windows program to allow me to use VS12 to debug it. Given that I haven't actually wrote a Windows program in 8 years, that took a bit of "rememberin'" to get going correctly.

With that I was able to fix a couple of bugs in the function itself and test it at all the corners and in the middle for both 1D and 2D tables. The function itself is now working exactly as desired.

Moving the code back to CW, I found that due to some changes I made to the table struct, the correct data was not being passed into the function (and it was before...). Mark sent me an email last night with the information I needed on how to correct this in the firmware, or more specifically, the ini file.

I will try to get that rolling tonight. If I'm not able to wrap this up tonight, I won't be able to work on it again until Wednesday due to projects at work.


Top
 Profile  
 
 Post subject: Re: Standardizing the math
PostPosted: Mon Jul 01, 2013 7:49 pm 
Offline
User avatar

Joined: Sat May 11, 2013 9:45 am
Posts: 729
Location: PA, USA
Clint if you just focus on 1 table and get it sorted I can go in and make the rest the same....monkey work I can do :)


Top
 Profile  
 
 Post subject: Re: Standardizing the math
PostPosted: Fri Jul 05, 2013 9:34 pm 
Offline
User avatar

Joined: Thu May 30, 2013 1:11 am
Posts: 54
Ok. I'm SLIGHTLY giving up. What I mean is I pushed the "as is" code up on Mark_5634 to ask for help with this.

Here is the status:
1) As far as I know, the function table_lookup() itself IS fully functional for both 1D and 2D tables in the middle and at all corners. This has been tested under windows (Copied over table_lookup.c and .h so I could use a real IDE and a REAL debugger) and it works.

2) I had reordered the structure slightly to:
Code:
struct table
{
   uint8_t rows;  /* Number of rows in the table */
   uint8_t cols;   /* Number of columns in the table */

   uint16_t filler; /*filler to put 32bit stuff on multiple of 4*/

   float row_axis[MAX_ROWS];  /* Vector to store variable row coordinates */
   float col_axis[MAX_COLS];   /* Vector to store variable column coordinates */         
   float data[MAX_ROWS * MAX_COLS];  /* rows*cols array of floats, X order, rows first */
};


This was just a flip of the position of the col_axis[MAX_COLS] and row_axis[MAX_ROWS] elements to put them in the same order as "rows" and "cols" above it.
3) After updating the project with the edits (and known working) for table_lookup.c, I ran it and debugged it in CW.
4) Data being passed into the function was wrong. For example, the "rows" value was always 0x54 and the "cols" value was always 0. Needless to say, 0x54 > 32 which is the max size for a row or column...
5) After changing the structure back to it's original order (rows, cols, filler, x_axis, y_axis, data), I ran it again, but I was still getting the same data in debug as above.

With that being said, I have been trying to get to the bottom of WHY the data is bad. And I have failed at that! I am not very familiar with the CW debugger, but I am definitely missing many of the features from the VS debugger.

So, at this point, I have pushed the edited table_look changes on Mark_5634 up so the rest of you gents can pull it and figure out what I broke! If nothing else, any ideas on what to look at would be greatly appreciated!


Top
 Profile  
 
 Post subject: Re: Standardizing the math
PostPosted: Mon Jul 08, 2013 12:09 pm 
Offline
User avatar

Joined: Sat May 11, 2013 9:45 am
Posts: 729
Location: PA, USA
I've had company so times been limited......

Phil has the outputblock working with floats and it's now working in the FW.

now to figureout what's wrong with the lookup....it's returning "0" at the moment and I'm not exactly sure how that's possible.


Top
 Profile  
 
 Post subject: Re: Standardizing the math
PostPosted: Mon Jul 15, 2013 3:58 pm 
Offline
User avatar

Joined: Sat May 11, 2013 9:45 am
Posts: 729
Location: PA, USA
I have just been swamped the last couple weeks......hopefully they'll be progress to report tomorrow.


Top
 Profile  
 
 Post subject: Re: Standardizing the math
PostPosted: Tue Jul 16, 2013 11:51 am 
Offline
User avatar

Joined: Sat May 11, 2013 9:45 am
Posts: 729
Location: PA, USA
progress.

It's now returning values, but x/y direction is screwed up which should be simple ......


Top
 Profile  
 
 Post subject: Re: Standardizing the math
PostPosted: Tue Jul 16, 2013 12:37 pm 
Offline
User avatar

Joined: Sat May 11, 2013 9:45 am
Posts: 729
Location: PA, USA
mk e wrote:
progress.

It's now returning values, but x/y direction is screwed up which should be simple ......


ok, it's finding the right value now but it's an integer not a float it looks like. One step at a time I guess.....


Top
 Profile  
 
 Post subject: Re: Standardizing the math
PostPosted: Wed Jul 17, 2013 8:47 am 
Offline
User avatar

Joined: Sat May 11, 2013 9:45 am
Posts: 729
Location: PA, USA
still getting an uint return.....I need to use a phone a friend I guess.


Top
 Profile  
 
 Post subject: Re: Standardizing the math
PostPosted: Wed Jul 17, 2013 4:15 pm 
Offline
User avatar

Joined: Sat May 11, 2013 9:45 am
Posts: 729
Location: PA, USA
mk e wrote:
still getting an uint return.....I need to use a phone a friend I guess.



Finally found it! It was not a table error, it was an over-site in the general code during the change to float.

Still 1 error near the upper right corner to sort but it's pretty close now.


Top
 Profile  
 
 Post subject: Re: Standardizing the math
PostPosted: Fri Jul 19, 2013 5:59 pm 
Offline
User avatar

Joined: Sat May 11, 2013 9:45 am
Posts: 729
Location: PA, USA
i made some progress today but it's still not quite there :?


Top
 Profile  
 
 Post subject: Re: Standardizing the math
PostPosted: Mon Jul 22, 2013 1:17 pm 
Offline
User avatar

Joined: Sat May 11, 2013 9:45 am
Posts: 729
Location: PA, USA
Finally the table lookup seems to be working right.....at least the 2D table. Clint had it close but a couple little things needs help.

The 1d is not working right in TS so I need to find out where Phil is with that.

I have some other TS work to do too getting TS matching the ini for all the tables not just fuel.


Top
 Profile  
 
 Post subject: Re: Standardizing the math
PostPosted: Mon Jul 22, 2013 2:12 pm 
Offline
User avatar

Joined: Sat May 11, 2013 9:45 am
Posts: 729
Location: PA, USA
mk e wrote:

The 1d is not working right in TS so I need to find out where Phil is with that.


Ask and ye shall receive, Phil sent me a new version that seems to solve the problem.

Now to load everything up, test the 1d part of the lookup, then test the actual engine control part of the FW.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 100 posts ]  Go to page Previous  1, 2, 3, 4  Next

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Theme designed by stylerbb.net © 2008
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All times are UTC - 5 hours [ DST ]