From eba916b312b2dbfd032b1751d346ddc7cc55175f Mon Sep 17 00:00:00 2001 From: andrewsumner Date: Mon, 20 Apr 2009 01:01:08 +0000 Subject: [PATCH] USR_SC: fixes to the "getting unstuck" code git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@892 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: 4f75a2d3235c03a429ecfaf4a4aa701a6114b24f Former-commit-id: 3274673306e2cde2c16c9fab4ec239b75fa0573f --- src/drivers/usr_sc/driver.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/drivers/usr_sc/driver.cpp b/src/drivers/usr_sc/driver.cpp index 77368e2c6..b479a7c4b 100644 --- a/src/drivers/usr_sc/driver.cpp +++ b/src/drivers/usr_sc/driver.cpp @@ -1836,7 +1836,7 @@ float Driver::getOffset() //double incspeed = MIN(40.0, MAX(30.0, getSpeed())); //double incfactor = (MAX_INC_FACTOR*0.5 - MIN(incspeed/10, MAX_INC_FACTOR*0.5-0.5)) * 60 * IncFactor; double incspeed = MIN(60.0, MAX(40.0, getSpeed())) - 10.0; - double incfactor = (MAX_INC_FACTOR - MIN(fabs(incspeed)/MAX_INC_FACTOR, (MAX_INC_FACTOR - 1.0f))) * (10.0f + MAX(0.0, (CA-1.9)*10));// * MAX(0.4, 1.0 - (fabs(rldata->aInverse)*3)); + double incfactor = (MAX_INC_FACTOR - MIN(fabs(incspeed)/MAX_INC_FACTOR, (MAX_INC_FACTOR - 1.0f))) * (10.0f + MAX(0.0, (CA-1.9)*10)) * IncFactor; //double rgtinc = incfactor * MIN(3.0, MAX(0.6, 1.0 + rldata->mInverse * (rldata->mInverse<0.0?-5:100))); //double lftinc = incfactor * MIN(3.0, MAX(0.6, 1.0 - rldata->mInverse * (rldata->mInverse>0.0?-5:100)));