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

added pidalt stuff into cli

added a modifier for set (type "set *") to see min/max values for each parameter. this is for gui stuff
bumped config VERSION
fixed 0xffff - now stuff in drv_pwm, after it was mentioned to me for the  3rd time :p
replaced some uint8_t -> uint32_t for loop counters - saving 4 to 8 bytes of flash each time. thanks goes to thee 35+ years of C experience kicad guy.
turned bitfiends into a regular struct - instant 100byte flash size reduction

git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@174 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
This commit is contained in:
timecop 2012-07-02 15:47:12 +00:00
parent c998f5ca67
commit 829331c020
12 changed files with 2747 additions and 2756 deletions

View file

@ -79,11 +79,7 @@ static void ppmIRQHandler(TIM_TypeDef *tim)
TIM_ClearITPendingBit(tim, TIM_IT_CC1);
if (now > last) {
diff = (now - last);
} else {
diff = ((0xFFFF - last) + now);
}
diff = now - last;
if (diff > 2700) { // Per http://www.rcgroups.com/forums/showpost.php?p=21996147&postcount=3960 "So, if you use 2.5ms or higher as being the reset for the PPM stream start, you will be fine. I use 2.7ms just to be safe."
chan = 0;
@ -98,7 +94,7 @@ static void ppmIRQHandler(TIM_TypeDef *tim)
static void pwmIRQHandler(TIM_TypeDef *tim)
{
uint8_t i;
uint32_t i;
uint16_t val = 0;
for (i = 0; i < 8; i++) {
@ -162,7 +158,7 @@ static void pwmInitializeInput(bool usePPM)
GPIO_InitTypeDef GPIO_InitStructure = { 0, };
TIM_TimeBaseInitTypeDef TIM_TimeBaseStructure = { 0, };
NVIC_InitTypeDef NVIC_InitStructure = { 0, };
uint8_t i;
uint32_t i;
// Input pins
if (usePPM) {