mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-15 04:15:44 +03:00
Remove mpu6050_scale from core_t by providing a sensor independent way
of determining a revision code. Previously there was mpu6050 specific code in cli.c (the status command). Finally this commit has removed all non-serial port configuration settings from core_t so that a future commit can refactor core_t to reduce dependencies on serial port code. In doing this I also noted from other source code that the MPU6050 accelerometer trim for some revisions appeared to be incorrectly set to 255 * 8 instead of 256 * 8.
This commit is contained in:
parent
94c0f87c45
commit
2baf385b99
16 changed files with 59 additions and 29 deletions
|
@ -30,7 +30,6 @@ static void cliVersion(char *cmdline);
|
|||
|
||||
// from sensors.c
|
||||
extern uint8_t batteryCellCount;
|
||||
extern uint8_t accHardware;
|
||||
|
||||
// from config.c RC Channel mapping
|
||||
extern const char rcChannelLetters[];
|
||||
|
@ -996,8 +995,8 @@ static void cliStatus(char *cmdline)
|
|||
}
|
||||
if (sensors(SENSOR_ACC)) {
|
||||
printf("ACCHW: %s", accNames[accHardware]);
|
||||
if (accHardware == ACC_MPU6050)
|
||||
printf(".%c", core.mpu6050_scale ? 'o' : 'n');
|
||||
if (acc.revisionCode)
|
||||
printf(".%c", acc.revisionCode);
|
||||
}
|
||||
cliPrint("\r\n");
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue