I have an idea that I want to try and I need help from programmers. Currently there is the option to target a boost level per gear if the tps is over an amount. My thought was to rescale the tps value up to an amount per each gear. For example. In 1st gear you could put 50% and then if your throttle position was at 100 the table would target along the 50% throttle line. If throttle position was at half then it would target along the 25% line. I would like to test my idea but I'm running into an issue.
This is the current code when the throttle is over the set point.
Code: Select all
targ_load = ram5.boost_geartarg[tmp_gear];
I am testing this code.
Code: Select all
int tps_target, rescaled_tps;
tps_target = ram5.boost_geartarg[tmp_gear];
rescaled_tps = outpc.tps*tps_target/100;
targ_load = intrp_2ditable(outpc.rpm, rescaled_tps, 8, ect ect ect);
If I get it working, I can clean up the code to avoid using extra variables but for now my issue is with outpc.tps. Normally the function intrp_2ditable is called by putting outpc.tps directly into it. I'm trying to rescale it by using the value from the boost_geartarg array. That actually works. I confirmed that by replacing outpc.tps with a value such as 50.
As it is, I'm getting wildly fluctuating values when I try to rescale outpc.tps. Can anyone give me any insight into this? I'm guessing it is a signed integer value from which is 0 at the low calibration and 1000 at the high calibation?