dronekit / dronekit-python

DroneKit-Python library for communicating with Drones via MAVLink.
https://readthedocs.org/projects/dronekit-python/
Apache License 2.0
1.62k stars 1.44k forks source link

set battery values in sitl #841

Open mehboobyounus opened 6 years ago

mehboobyounus commented 6 years ago

how to change battery values in sitl copter simulation in one connection through dronekit python api..?

NassimSadallah commented 6 years ago

hi, i have the same problem, after 2 minutes of flying i get a warning message on the console about the battery voltage. So if anyone know how to resolve this problem we are waiting for... changing the battery values i think there is no manner, i've searched for this solution and i didn't found anything, but is there a way to modify the battery type (in the sitl there is a 3S with low mAH i think) if just we can change for exemple 4S with 5000mAh or something like.....

uruskan commented 5 years ago

Hello, I am working on the same thing too. I found default.parm files under sitl but there is nothing about battery except BATT_MONITOR and I don't think that its related to the battery type or anything, so if someone can help it would be really great.

BkMak16 commented 4 years ago

Hi

You can change the battery values on the ArduPilot SITL after starting the SITL. Use the param command. In the SITL terminal start with "param show SIM_BATTERY*" no quotations, astrix at the end, and it should show your current battery voltage.

Change the value with param set SIM_BATTERY {VALUE}