mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-17 13:23:35 +08:00
Abstractions to compile systemlib for Linux and Nuttx
Modified uint32_t casts of pointers to unsigned long for portability. It otherwise breaks on x86_64. Added _PX4_IOC to handle the conflice between _IOC on Linux and NuttX. Removed use of px4::ok() because it cannot be used in a thread based implementation. Changed to use px4::AppMgr which uses ok() on ROS. Removed up_cxxinitialize.c from Linux build. Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
@@ -41,7 +41,8 @@
|
||||
* and background parameter saving.
|
||||
*/
|
||||
|
||||
#include <debug.h>
|
||||
//#include <debug.h>
|
||||
#include <px4_defines.h>
|
||||
#include <string.h>
|
||||
#include <stdbool.h>
|
||||
#include <fcntl.h>
|
||||
@@ -646,7 +647,7 @@ param_save_default(void)
|
||||
const char *filename = param_get_default_file();
|
||||
|
||||
/* write parameters to temp file */
|
||||
fd = open(filename, O_WRONLY | O_CREAT);
|
||||
fd = open(filename, O_WRONLY | O_CREAT, 0x777);
|
||||
|
||||
if (fd < 0) {
|
||||
warn("failed to open param file: %s", filename);
|
||||
|
||||
Reference in New Issue
Block a user