How to add a new failsafe for battery level?

Hello Guys,

i think about to have two or more stages for battery fail-save.

  1. Battery half: return to land.
  2. Battery empty: land

is this possible and how it is possible?

Many thanks

Isn’t this already what is implemented, except that you need to adjust the limits?

@MaEtUgR can you confirm?

1 Like

I see only one option in Safety.

Empty Battery

Can you explain me, how this works with two levels?

The battery simulation for SITL is here:

So you could adapt this simulation to go all the way down to 0 and play with it to find out what happens :smile:


i see there no info.
You are shure to understand my questiion?

I seach a parameter, which defined the action by half of battery.

Thanks for help

the params are:

Ok, now i understand.
Critical - Failsave (return)
Emergency - Land
Low - Warning

Failsave means “return mode at critical low level” ?
Emergency means “reaching dangerously low levels” ?

So i have to increase the “Critical level” for return.


1 Like

Yes, by default the thresholds are:
which results in:

  • 15% - “OK”

  • 7-15% - Low - Default: Warning for user, configurable by COM_LOW_BAT_ACT
  • 5-7% - Critical - Return to launch
  • < 5% - Emergency - Land on the spot


You can set these parameters on your vehicle to set different thresholds. As @JulianOes mentioned you can test the reactions in SITL simulation on your computer by setting the minimal simulated percentage (default is 50%) to the value 0.0f here:

I strongly recommend to you to follow these instructions such that you get meaningful battery percentage values out of your power module setup and configuration:

1 Like