Implement the way to run posix simulator directly from IDE without the need to reconfigure command lines, but use runner created via CMake

Steps to debug:
 * Run gazebo (or any other sim) server and client viewers via the terminal: `make posix_sitl_default gazebo_none_ide`
 * In your IDE select `px4_<mode>` target you want to debug (e.g. `px4_iris`)
 * Start debug session directly from IDE

This approach significantly reduces the debug cycle time because simulator (e.g. gazebo) is always running in background and you only re-run px4 process which is very light.
This commit is contained in:
Anton Matosov
2016-12-10 12:48:53 +01:00
committed by Lorenz Meier
parent a2c0391bcc
commit fff4934743
4 changed files with 195 additions and 98 deletions
+6
View File
@@ -286,7 +286,13 @@ static void set_cpu_scaling()
#endif
}
#ifdef __PX4_SITL_MAIN_OVERRIDE
int SITL_MAIN(int argc, char **argv);
int SITL_MAIN(int argc, char **argv)
#else
int main(int argc, char **argv)
#endif
{
bool daemon_mode = false;
bool chroot_on = false;