1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-14 03:50:02 +03:00

Applied patch from trunet for running at 64MHz off HSI for broken Chinese kcopter clones

status in cli now prints cpu MHz, 72 when running off crystal, 64 when running off intrc.
corrected WHO_AM_I check for mpu6050 when it's used on alternate address (AD0 high).
corrected PWM driver to consider CPU clock for timer prescalers - now things properly work below 72MHz
added a neat hack for pitch angle calculation so that it's not affected when roll reaches 90deg
added proper math for vector rotation instead of small-angle approximation

git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@225 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61
This commit is contained in:
timecop@gmail.com 2012-10-06 14:40:24 +00:00
parent 4a4c0d585d
commit 005308b430
10 changed files with 3110 additions and 3843 deletions

View file

@ -728,7 +728,7 @@ static void cliStatus(char *cmdline)
millis() / 1000, vbat, batteryCellCount);
mask = sensorsMask();
uartPrint("Detected sensors: ");
printf("CPU %dMHz, detected sensors: ", (SystemCoreClock / 1000000));
for (i = 0; ; i++) {
if (sensorNames[i] == NULL)
break;
@ -744,7 +744,7 @@ static void cliStatus(char *cmdline)
static void cliVersion(char *cmdline)
{
uartPrint("Afro32 CLI version 2.0 " __DATE__ " / " __TIME__);
uartPrint("Afro32 CLI version 2.1 " __DATE__ " / " __TIME__);
}
void cliProcess(void)