mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-11-29 07:24:13 +01:00
Merge remote-tracking branch 'origin/igor/pidt1' into relay_tuning
Conflicts: flight/Modules/Stabilization/stabilization.c
This commit is contained in:
commit
9763a70364
@ -33,16 +33,23 @@ OUTDIR := $(TOP)/build/$(TARGET)
|
||||
.PHONY: bin
|
||||
bin: $(OUTDIR)/$(TARGET).bin
|
||||
|
||||
FW_PAD = $(shell echo $$[$(FW_BANK_BASE)-$(BL_BANK_BASE)-$(BL_BANK_SIZE)])
|
||||
$(OUTDIR)/$(TARGET).pad:
|
||||
FW_PRE_PAD = $(shell echo $$[$(FW_BANK_BASE)-$(BL_BANK_BASE)-$(BL_BANK_SIZE)])
|
||||
$(OUTDIR)/$(TARGET).fw_pre.pad:
|
||||
$(V0) @echo $(MSG_PADDING) $@
|
||||
$(V1) dd status=noxfer if=/dev/zero count=$(FW_PAD) bs=1 2>/dev/null | tr '\000' '\377' > $@
|
||||
$(V1) dd status=noxfer if=/dev/zero count=$(FW_PRE_PAD) bs=1 2>/dev/null | tr '\000' '\377' > $@
|
||||
|
||||
FW_POST_PAD = $(shell echo $$[$(FW_BANK_SIZE)-$(FW_DESC_SIZE)-$$(stat -c%s $(FW_BIN))])
|
||||
$(OUTDIR)/$(TARGET).fw_post.pad:
|
||||
$(V0) @echo $(MSG_PADDING) $@
|
||||
$(V1) dd status=noxfer if=/dev/zero count=$(FW_POST_PAD) bs=1 2>/dev/null | tr '\000' '\377' > $@
|
||||
|
||||
|
||||
BL_BIN = $(TOP)/build/bl_$(BOARD_NAME)/bl_$(BOARD_NAME).bin
|
||||
FW_BIN = $(TOP)/build/fw_$(BOARD_NAME)/fw_$(BOARD_NAME).bin
|
||||
$(OUTDIR)/$(TARGET).bin: $(BL_BIN) $(FW_BIN) $(OUTDIR)/$(TARGET).pad
|
||||
FWINFO_BIN = $(FW_BIN).firmwareinfo.bin
|
||||
$(OUTDIR)/$(TARGET).bin: $(BL_BIN) $(FW_BIN) $(OUTDIR)/$(TARGET).fw_pre.pad $(OUTDIR)/$(TARGET).fw_post.pad
|
||||
$(V0) @echo $(MSG_FLASH_IMG) $@
|
||||
$(V1) cat $(BL_BIN) $(OUTDIR)/$(TARGET).pad $(FW_BIN) > $@
|
||||
$(V1) cat $(BL_BIN) $(OUTDIR)/$(TARGET).fw_pre.pad $(FW_BIN) $(OUTDIR)/$(TARGET).fw_post.pad $(FWINFO_BIN) > $@
|
||||
|
||||
.PHONY: dfu
|
||||
dfu: $(OUTDIR)/$(TARGET).bin
|
||||
|
@ -420,6 +420,10 @@ static int32_t updateSensorsCC3D(AccelsData * accelsData, GyrosData * gyrosData)
|
||||
gyrosData->z += gyro_correct_int[2];
|
||||
}
|
||||
|
||||
// Because most crafts wont get enough information from gravity to zero yaw gyro, we try
|
||||
// and make it average zero (weakly)
|
||||
gyro_correct_int[2] += - gyrosData->z * yawBiasRate;
|
||||
|
||||
GyrosSet(gyrosData);
|
||||
AccelsSet(accelsData);
|
||||
|
||||
|
@ -67,6 +67,7 @@
|
||||
|
||||
enum {PID_RATE_ROLL, PID_RATE_PITCH, PID_RATE_YAW, PID_ROLL, PID_PITCH, PID_YAW, PID_MAX};
|
||||
|
||||
|
||||
// Private variables
|
||||
static xTaskHandle taskHandle;
|
||||
static StabilizationSettingsData settings;
|
||||
@ -391,6 +392,7 @@ static void ZeroPids(void)
|
||||
for(uint32_t i = 0; i < PID_MAX; i++)
|
||||
pid_zero(&pids[i]);
|
||||
|
||||
|
||||
for(uint8_t i = 0; i < 3; i++)
|
||||
axis_lock_accum[i] = 0.0f;
|
||||
}
|
||||
|
@ -75,6 +75,7 @@ SECTIONS
|
||||
{
|
||||
. = ALIGN(4);
|
||||
KEEP(*(.boardinfo))
|
||||
. = ALIGN(ORIGIN(BD_INFO)+LENGTH(BD_INFO));
|
||||
} > BD_INFO
|
||||
|
||||
/* Stabs debugging sections. */
|
||||
|
Loading…
Reference in New Issue
Block a user