|
|
@ -42,6 +42,7 @@ |
|
|
|
#include <stddef.h> |
|
|
|
#include <stddef.h> |
|
|
|
#include <stdint.h> |
|
|
|
#include <stdint.h> |
|
|
|
#include <px4_platform_common/tasks.h> |
|
|
|
#include <px4_platform_common/tasks.h> |
|
|
|
|
|
|
|
#include <px4_platform_common/atomic.h> |
|
|
|
|
|
|
|
|
|
|
|
#pragma once |
|
|
|
#pragma once |
|
|
|
|
|
|
|
|
|
|
@ -77,8 +78,15 @@ public: |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
size_t available(); |
|
|
|
size_t available(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void setTargetID(uint8_t sysid, uint8_t compid) { _target_sysid.store(sysid); _target_compid.store(compid); } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
uint8_t targetSysid() const { return _target_sysid.load(); } |
|
|
|
|
|
|
|
uint8_t targetCompid() const { return _target_compid.load(); } |
|
|
|
private: |
|
|
|
private: |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
px4::atomic<uint8_t> _target_sysid{}; |
|
|
|
|
|
|
|
px4::atomic<uint8_t> _target_compid{}; |
|
|
|
|
|
|
|
|
|
|
|
int _to_shell_fd = -1; /** fd to write to the shell */ |
|
|
|
int _to_shell_fd = -1; /** fd to write to the shell */ |
|
|
|
int _from_shell_fd = -1; /** fd to read from the shell */ |
|
|
|
int _from_shell_fd = -1; /** fd to read from the shell */ |
|
|
|
int _shell_fds[2] = { -1, -1}; /** stdin & out used by the shell */ |
|
|
|
int _shell_fds[2] = { -1, -1}; /** stdin & out used by the shell */ |
|
|
|