Subversion Repositories FlightCtrl

Rev

Rev 2017 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2017 Rev 2018
Line 386... Line 386...
386
    }
386
    }
387
  }
387
  }
388
}
388
}
Line 389... Line 389...
389
 
389
 
390
void calculateAccVector(void) {
390
void calculateAccVector(void) {
391
        uint16_t temp;
391
        int16_t temp;
392
        temp = filteredAcc[0]/4;
392
        temp = filteredAcc[0] >> 3;
393
        accVector = temp * temp;
393
        accVector = temp * temp;
394
        temp = filteredAcc[1]/4;
394
        temp = filteredAcc[1] >> 3;
395
        accVector += temp * temp;
395
        accVector += temp * temp;
396
        temp = filteredAcc[2]/4;
396
        temp = filteredAcc[2] >> 3;
397
        accVector += temp * temp;
397
        accVector += temp * temp;
398
        debugOut.analog[18] = accVector;
398
        debugOut.analog[18] = accVector;
399
    debugOut.analog[19] = dynamicParams.maxAccVector;
399
    debugOut.analog[19] = dynamicParams.maxAccVector;