Quote:
|
Originally Posted by ToMMan b182
ok i've gotten this to work.. but how exactly would i use this in my code?
|
This isn't intended to be used
in the code. It's intended to save you time if you're putting lookup tables into your code. Here's how I use it... First I use the spreadsheet/math functions in Excel to generate the values for my lookup table (for example, y = sin(x)). Then to save me the trouble of manually typing each and every lookup table value into my code I wrote that little macro to just dump all the values into a .txt file. Then I open the text file and copy and paste the lookup table into my code. It's just a time-saving device. It really proves its worth for another use though. We use a non-linear transfer function in the form of a lookup table to de-sensitize our joysticks (see
this thread). Using Excel we can model the shape of the function to tailor the joystick response to the driver's liking. The automated generation of the lookup table saves us time so that we can quickly prototype new functions and dump the lookup table into the code during the testing phase.
Anyway, hopefully you can find a use for it and it saves you some time.
Cheers,