mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-27 01:13:33 +08:00
Cygwin: Enable build of SITL jMAVsim under Windows using the Cygwin Unix-like environment
Most of the incompatitbilities are luckily similar to the darwin build. - New target OS __PX4_CYGWIN added because in other build environments on Windows defines will very likely be completely different - added all necessary exeptions to the defines - disabled priorities completely because on Windows they are defined 1-32 and with all the arbitrary +40 -40 priority settings there were a lot of problems not only did some threads/"virtual tasks" not start because of out of bound priorities but also the resulting scheduling was totally random and inadequate with default priorities it ran toally fine during my first tests, should be rethought when windows is used onboard in the future
This commit is contained in:
committed by
Daniel Agar
parent
02c4ec9b2a
commit
70de169f15
+1
-1
@@ -52,7 +52,7 @@
|
||||
#include "common_rc.h"
|
||||
#include <drivers/drv_hrt.h>
|
||||
|
||||
#if defined (__PX4_LINUX) || defined (__PX4_DARWIN) || defined(__PX4_QURT)
|
||||
#if defined (__PX4_LINUX) || defined (__PX4_DARWIN) || defined(__PX4_CYGWIN) || defined(__PX4_QURT)
|
||||
#define dsm_udelay(arg) usleep(arg)
|
||||
#else
|
||||
#include <nuttx/arch.h>
|
||||
|
||||
@@ -253,8 +253,8 @@ uint32_t px4_board_version(void)
|
||||
|
||||
uint32_t px4_os_version(void)
|
||||
{
|
||||
#if defined(__PX4_DARWIN)
|
||||
return 0; //TODO: implement version for Darwin
|
||||
#if defined(__PX4_DARWIN) || defined(__PX4_CYGWIN) || defined(__PX4_QURT)
|
||||
return 0; //TODO: implement version for Darwin, Cygwin, QuRT
|
||||
#elif defined(__PX4_LINUX)
|
||||
struct utsname name;
|
||||
|
||||
@@ -273,8 +273,6 @@ uint32_t px4_os_version(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#elif defined(__PX4_QURT)
|
||||
return 0; //TODO: implement version for QuRT
|
||||
#elif defined(__PX4_NUTTX)
|
||||
return version_tag_to_number(NUTTX_GIT_TAG_STR);
|
||||
#else
|
||||
@@ -301,6 +299,8 @@ const char *px4_os_name(void)
|
||||
return "QuRT";
|
||||
#elif defined(__PX4_NUTTX)
|
||||
return "NuttX";
|
||||
#elif defined(__PX4_CYGWIN)
|
||||
return "Cygwin";
|
||||
#else
|
||||
# error "px4_os_name not implemented for current OS"
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user