mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-14 03:50:02 +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:
parent
c998f5ca67
commit
829331c020
12 changed files with 2747 additions and 2756 deletions
|
@ -115,7 +115,7 @@ uint16_t batteryAdcToVoltage(uint16_t src)
|
|||
|
||||
void batteryInit(void)
|
||||
{
|
||||
uint8_t i;
|
||||
uint32_t i;
|
||||
uint32_t voltage = 0;
|
||||
|
||||
// average up some voltage readings
|
||||
|
@ -138,7 +138,7 @@ void batteryInit(void)
|
|||
static void ACC_Common(void)
|
||||
{
|
||||
static int32_t a[3];
|
||||
uint8_t axis;
|
||||
uint32_t axis;
|
||||
|
||||
if (calibratingA > 0) {
|
||||
for (axis = 0; axis < 3; axis++) {
|
||||
|
@ -272,7 +272,7 @@ static void GYRO_Common(void)
|
|||
{
|
||||
static int16_t previousGyroADC[3] = { 0, 0, 0 };
|
||||
static int32_t g[3];
|
||||
uint8_t axis;
|
||||
uint32_t axis;
|
||||
|
||||
if (calibratingG > 0) {
|
||||
for (axis = 0; axis < 3; axis++) {
|
||||
|
@ -328,7 +328,7 @@ void Mag_init(void)
|
|||
{
|
||||
uint8_t calibration_gain = 0x60; // HMC5883
|
||||
#if 1
|
||||
uint8_t numAttempts = 0, good_count = 0;
|
||||
uint32_t numAttempts = 0, good_count = 0;
|
||||
bool success = false;
|
||||
uint16_t expected_x = 766; // default values for HMC5883
|
||||
uint16_t expected_yz = 713;
|
||||
|
@ -405,7 +405,7 @@ void Mag_getADC(void)
|
|||
static uint32_t t, tCal = 0;
|
||||
static int16_t magZeroTempMin[3];
|
||||
static int16_t magZeroTempMax[3];
|
||||
uint8_t axis;
|
||||
uint32_t axis;
|
||||
|
||||
if (currentTime < t)
|
||||
return; //each read is spaced by 100ms
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue