1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-24 16:55:36 +03:00

Tightening up code inside atomic block, and whitespace changes (tabs to spaces)

This commit is contained in:
Ben Hitchcock 2014-12-04 06:59:27 +08:00
parent 8a9e51c779
commit 895d215265
3 changed files with 40 additions and 40 deletions

View file

@ -161,7 +161,7 @@ static void ppmEdgeCallback(timerCCHandlerRec_t* cbRec, captureCompare_t capture
ppmDev.currentTime += ppmDev.largeCounter;
// Divide by 8 if Oneshot125 is active and this is a CC3D board
ppmDev.currentTime = ppmDev.currentTime >> ppmCountShift;
ppmDev.currentTime = ppmDev.currentTime >> ppmCountShift;
/* Capture computation */
ppmDev.deltaTime = ppmDev.currentTime - ppmDev.previousTime;
@ -331,9 +331,9 @@ void ppmInConfig(const timerHardware_t *timerHardwarePtr)
timerConfigure(timerHardwarePtr, (uint16_t)PPM_TIMER_PERIOD, PWM_TIMER_MHZ);
if((timerHardwarePtr->tim == TIM4) && (feature(FEATURE_ONESHOT125))){
ppmCountShift = 3; // Divide by 8 if the timer is running at 8 MHz
}
if((timerHardwarePtr->tim == TIM4) && (feature(FEATURE_ONESHOT125))){
ppmCountShift = 3; // Divide by 8 if the timer is running at 8 MHz
}
timerChCCHandlerInit(&self->edgeCb, ppmEdgeCallback);