mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-19 14:25:20 +03:00
finished updating to 4.4. Finished Boost V1
This commit is contained in:
parent
6318cdede7
commit
900d3f8568
24 changed files with 76 additions and 407729 deletions
44
SPEC README.txt
Normal file
44
SPEC README.txt
Normal file
|
@ -0,0 +1,44 @@
|
|||
Disclaimer:
|
||||
Street League Spec, its partners, and the authors of this software are not responsible for injury or damage to property resulting from the use of this software. Use at your own risk
|
||||
|
||||
What is the RPM limiter?
|
||||
The RPM limiter seeks to better equalize the performance of drone motors for spec racing purposes. A PID loop is used to limit the drone's maximum rpm to 13k rpm at 100% throttle. The limiter also linearizes the rpm of the motors such that, for example, 50% throttle will result in 50% of 13k rpm, 25% will result in 25% of the max throttle, etc. This means that battery sag will have very little effect on the rpm of the motors throughout the flight, and you will not feel it the same way you typically do. Please ensure voltage alarms configured on your drone.
|
||||
|
||||
IMPORTANT - Before/after flashing:
|
||||
Before flashing, click auto-detect in the firmware tab in betaflight or select your FC from the dropdown
|
||||
- This tells Betaflight which custom defaults it should apply to your quad after flashing.
|
||||
When you connect for the first time, you should be prompted to apply custom defaults. You MUST do this or your FC may not work properly.
|
||||
If you are not prompted to apply custom defaults, use the custom defaults found on the Betaflight's github
|
||||
- https://github.com/betaflight/unified-targets/tree/master/configs/default
|
||||
|
||||
Which HEX do I use?
|
||||
- connect your fc to betaflight
|
||||
- open the cli tab and type "version"
|
||||
- look for board_name: (YOUR BOARD NAME HERE)
|
||||
- this will show you which board you should flash
|
||||
- if in doubt, check what target your FC's manufacterur recommends in their user manual
|
||||
- If you have any questions, please reach out on our discord: https://discord.gg/C4HHYccaqk
|
||||
|
||||
How do I activate the boost?
|
||||
- We've hijacked the beeper mode in betaflight in order to enable boost without any complicated cli commands
|
||||
- Simply open the modes tab and apply an aux channel and range to the beeper mode
|
||||
- We also recommend enabling the boost bar in your OSD so you can keep track of your boost usage
|
||||
- Open the OSD tab and enable "Battery usage" and leave the drop down on "Graphical remaining"
|
||||
|
||||
Optional CLI Commands:
|
||||
- if you are having issues launching your drone (E.G. low power when you try to take off), consider lowering your moter idle speed.
|
||||
- You can also try the cli command "set rpm_limiter_idle_rpm = 14"
|
||||
- This sets the expected idle rpm / 100. For street league a good starting place is 1400 RPM, which is `set rpm_limiter_idle_rpm = 14`.
|
||||
THE QUAD WILL SPIN UP TO THIS RPM WHEN ARMED, SO DO NOT SET TO ANY VALUE ABOVE 50!
|
||||
|
||||
|
||||
Blackbox setup:
|
||||
You can view the rpm averaged accross the 4 motors as well as the P term, I term and D term in the blackbox. Simply `set debug_mode = RPM_LIMITER` in the cli. The values logged as a result are as follows in this order
|
||||
Debug 0. Average RPM
|
||||
Debug 1. RPM error: Difference between desired RPM limit and smoothed average rpm. RPM limit is rpm_limiter_rpm_limit for linearization off and rpm_limiter_rpm_limit*throttle for linearization on. Positive means overspeed, negative means underspeed
|
||||
Debug 2. I term (positive means term is pulling the throttle down)
|
||||
Debug 3. D term (positive means term is pulling the throttle down)
|
||||
|
||||
Am I spec yet?
|
||||
Once you have flashed the HEX, your FC is spec! If you have any issues, please verify they don't also exist on stock betaflight. Then report them here.
|
||||
- https://github.com/StreetLeagueSpec/betaflight
|
|
@ -1,19 +0,0 @@
|
|||
Disclaimer:
|
||||
Street League, its partners, and the authors of this software are not responsible for injury or damage to property resulting from the use of this software.
|
||||
|
||||
What is the RPM limiter?
|
||||
The RPM limiter seeks to better equalize the performance of drone motors for spec racing purposes. A PID loop is used to limit the drone's maximum rpm to 13k rpm at 100% throttle. The limiter also linearizes the rpm of the motors such that, for example, 50% throttle will result in 50% of 13k rpm, 25% will result in 25% of the max throttle, etc. This means that battery sag will have very little effect on the rpm of the motors throughout the flight, and it won't be felt via the throttle. Please ensure voltage alarms are configured on your OSD or radio.
|
||||
|
||||
Which HEX do I use?
|
||||
- plug your flight controller into your PC
|
||||
- Open Betaflight
|
||||
- In the top right corner will be displayed a dropdown menu with the COM port the FC is using
|
||||
- A COM port label of "COM4 - Betaflight STM32F7x2" indicates the user should flash the STM32F7x2 HEX file.
|
||||
- Note: pancake board users have a seperate hex
|
||||
- If you have any questions, please reach out on our discord: https://discord.gg/C4HHYccaqk
|
||||
|
||||
IMPORTANT - After flashing:
|
||||
After flashing, ALWAYS select "Apply Custom Defaults" when connecting for the first time!!!
|
||||
If you are not prompted to apply custom defaults, you will need to make sure you either paste a dump from before flashing, or copy your custom defaults from here.
|
||||
https://github.com/betaflight/unified-targets/tree/master/configs/default
|
||||
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
2
my-devices.csv
Normal file
2
my-devices.csv
Normal file
|
@ -0,0 +1,2 @@
|
|||
HOBBYWING_XROTORF7CONV
|
||||
|
|
|
@ -344,7 +344,7 @@ static void applyFlipOverAfterCrashModeToMotors(void)
|
|||
}
|
||||
}
|
||||
|
||||
int getAfterburnerTanksRemaining(void)
|
||||
uint8_t getAfterburnerTanksRemaining(void)
|
||||
{
|
||||
return mixerRuntime.afterburnerTanksRemaining;
|
||||
}
|
||||
|
@ -369,7 +369,7 @@ static void applyRPMLimiter(void)
|
|||
//afterburner code
|
||||
//if drone is armed
|
||||
if (ARMING_FLAG(ARMED)) {
|
||||
//if the afterburner switch is enguaged
|
||||
//if the afterburner switch is engaged
|
||||
if(IS_RC_MODE_ACTIVE(BOXBEEPERON)) {
|
||||
//if the afterburner isn't initiated
|
||||
if(mixerRuntime.afterburnerInitiated == false) {
|
||||
|
@ -382,27 +382,33 @@ static void applyRPMLimiter(void)
|
|||
}
|
||||
|
||||
}
|
||||
//if the afterburner switch is NOT enguaged
|
||||
//if the afterburner switch is NOT engaged
|
||||
} else {
|
||||
//if hold to boost is enabled
|
||||
if(mixerRuntime.afterburnerHoldToBoost) {
|
||||
mixerRuntime.afterburnerInitiated = false;
|
||||
}
|
||||
//if the tank is empty, reset
|
||||
if(mixerRuntime.afterburnerTankPercent<=0.0f) {
|
||||
mixerRuntime.afterburnerInitiated = false;
|
||||
mixerRuntime.afterburnerTanksRemaining -= 1;
|
||||
if(mixerRuntime.afterburnerTanksRemaining>0) {
|
||||
mixerRuntime.afterburnerTankPercent = 100.0f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//use afterburner
|
||||
if(mixerRuntime.afterburnerInitiated) {
|
||||
//if the tank is empty, reset
|
||||
if(mixerRuntime.afterburnerTankPercent<=0.0f) {
|
||||
mixerRuntime.afterburnerInitiated = false;
|
||||
//only refil the tank if we have one remaining
|
||||
if(mixerRuntime.afterburnerTanksRemaining>0) {
|
||||
mixerRuntime.afterburnerTanksRemaining -= 1;
|
||||
}
|
||||
if(mixerRuntime.afterburnerTanksRemaining>0) {
|
||||
mixerRuntime.afterburnerTankPercent = 100.0f;
|
||||
}
|
||||
|
||||
}
|
||||
//tank percent decreases linearly
|
||||
mixerRuntime.afterburnerTankPercent -= (pidGetDT()/(mixerRuntime.afterburnerDuration))*100.0f;
|
||||
//tank percent can never be above 100%
|
||||
mixerRuntime.afterburnerTankPercent = MIN(mixerRuntime.afterburnerTankPercent,100.0f);
|
||||
//tank percent can never be below 0%
|
||||
mixerRuntime.afterburnerTankPercent = MAX(mixerRuntime.afterburnerTankPercent,0.0f);
|
||||
//increase the rpm limit
|
||||
maxRPMLimit = mixerRuntime.RPMLimit+(mixerRuntime.afterburnerRPM*mixerRuntime.afterburnerTankPercent*0.01f);
|
||||
|
|
|
@ -141,5 +141,5 @@ bool isFixedWing(void);
|
|||
float getMotorOutputLow(void);
|
||||
float getMotorOutputHigh(void);
|
||||
|
||||
int getAfterburnerTanksRemaining(void);
|
||||
uint8_t getAfterburnerTanksRemaining(void);
|
||||
float getAfterburnerTankPercent(void);
|
|
@ -60,7 +60,7 @@ PG_RESET_TEMPLATE(mixerConfig_t, mixerConfig,
|
|||
.govenor_acceleration_limit = 60,
|
||||
.govenor_deceleration_limit = 60,
|
||||
.govenor_rpm_limit = 130,
|
||||
.govenor_rpm_afterburner = 15,
|
||||
.govenor_rpm_afterburner = 16,
|
||||
.govenor_rpm_afterburner_duration = 5,
|
||||
.govenor_rpm_afterburner_reset = true,
|
||||
.govenor_rpm_afterburner_hold_to_use = false,
|
||||
|
@ -326,25 +326,24 @@ void mixerInitProfile(void)
|
|||
#endif
|
||||
mixerRuntime.govenorExpectedThrottleLimit = 1.0f;
|
||||
|
||||
//Street League spec settigns
|
||||
/*mixerRuntime.govenorPGain = 20.0f * 0.0000015f;
|
||||
//Street League spec settings
|
||||
mixerRuntime.govenorPGain = 20.0f * 0.0000015f;
|
||||
mixerRuntime.govenorIGain = 15.0f * 0.0001f * pidGetDT();
|
||||
mixerRuntime.govenorDGain = 10.0f * 0.00000003f * pidGetPidFrequency();
|
||||
mixerRuntime.govenorAccelerationLimit = 60.0f * 1000.0f * pidGetDT();
|
||||
mixerRuntime.govenorDecelerationLimit = 60.0f * 1000.0f * pidGetDT();
|
||||
mixerRuntime.afterburnerRPM = mixerConfig()->govenor_rpm_afterburner;
|
||||
mixerRuntime.afterburnerReset = mixerConfig()->govenor_rpm_afterburner_reset;
|
||||
mixerRuntime.afterburnerDuration = mixerConfig()->govenor_rpm_afterburner_duration;
|
||||
mixerRuntime.afterburnerTanksRemaining = mixerConfig()->govenor_rpm_afterburner_tank_count;
|
||||
mixerRuntime.afterburnerHoldToBoost = mixerConfig()->govenor_rpm_afterburner_hold_to_use;
|
||||
mixerRuntime.afterburnerRPM = 16;
|
||||
mixerRuntime.afterburnerReset = false;
|
||||
mixerRuntime.afterburnerDuration = 5;
|
||||
mixerRuntime.afterburnerTanksRemaining = 3;
|
||||
mixerRuntime.afterburnerHoldToBoost = false;
|
||||
mixerRuntime.rpmLinearization = true;
|
||||
mixerRuntime.RPMLimit = 130.0f;
|
||||
mixerRuntime.motorPoleCount = 14;
|
||||
mixerRuntime.govenorEnabled = true;
|
||||
mixerRuntime.afterburnerInitiated = false;*/
|
||||
|
||||
//Unlocked rpm settings
|
||||
mixerRuntime.govenorPGain = mixerConfig()->govenor_p * 0.0000015f;
|
||||
/*mixerRuntime.govenorPGain = mixerConfig()->govenor_p * 0.0000015f;
|
||||
mixerRuntime.govenorIGain = mixerConfig()->govenor_i * 0.0001f * pidGetDT();
|
||||
mixerRuntime.govenorDGain = mixerConfig()->govenor_d * 0.00000003f * pidGetPidFrequency();
|
||||
mixerRuntime.govenorAccelerationLimit = mixerConfig()->govenor_acceleration_limit * 1000.0f * pidGetDT();
|
||||
|
@ -357,7 +356,7 @@ mixerRuntime.afterburnerHoldToBoost = mixerConfig()->govenor_rpm_afterburner_hol
|
|||
mixerRuntime.rpmLinearization = mixerConfig()->govenor_rpm_linearization;
|
||||
mixerRuntime.RPMLimit = mixerConfig()->govenor_rpm_limit;
|
||||
mixerRuntime.motorPoleCount = motorConfig()->motorPoleCount;
|
||||
mixerRuntime.govenorEnabled = mixerConfig()->govenor;
|
||||
mixerRuntime.govenorEnabled = mixerConfig()->govenor;*/
|
||||
|
||||
|
||||
mixerRuntime.govenorI = 0;
|
||||
|
|
|
@ -65,7 +65,7 @@ typedef struct mixerRuntime_s {
|
|||
float afterburnerDuration;
|
||||
float afterburnerTankPercent;
|
||||
bool afterburnerInitiated;
|
||||
int afterburnerTanksRemaining;
|
||||
uint8_t afterburnerTanksRemaining;
|
||||
bool rpmLinearization;
|
||||
float RPMLimit;
|
||||
int motorPoleCount;
|
||||
|
|
|
@ -419,7 +419,7 @@ void renderOsdWarning(char *warningText, bool *blinking, uint8_t *displayAttr)
|
|||
|
||||
// Visual beeper
|
||||
if (osdWarnGetState(OSD_WARNING_VISUAL_BEEPER) && osdGetVisualBeeperState()) {
|
||||
tfp_sprintf(warningText, " * * * *");
|
||||
tfp_sprintf(warningText, "BOOST ENGAGED");
|
||||
*displayAttr = DISPLAYPORT_SEVERITY_INFO;
|
||||
osdSetVisualBeeperState(false);
|
||||
return;
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue