Recreate lidia controls with Node2D
This commit is contained in:
parent
f3d38c7569
commit
821072eae5
23 changed files with 433 additions and 35 deletions
|
|
@ -45,6 +45,10 @@ public:
|
|||
float get_collective();
|
||||
// Get normalized (-1 to 1) pedals position, positive turn right
|
||||
float get_pedals();
|
||||
// Get normalized position for all controls
|
||||
Vector4 get_controls();
|
||||
// Get normalized trim position
|
||||
Vector4 get_trim();
|
||||
|
||||
// Is there a connection to MARSH Manager
|
||||
bool get_manager_connected();
|
||||
|
|
@ -76,6 +80,7 @@ private:
|
|||
void handle_attitude(mavlink_message_t message);
|
||||
void handle_param(mavlink_message_t message);
|
||||
void handle_manual_control(mavlink_message_t message);
|
||||
void handle_manual_setpoint(mavlink_message_t message);
|
||||
void handle_heartbeat(mavlink_message_t message);
|
||||
|
||||
void receive_model_data();
|
||||
|
|
@ -103,14 +108,18 @@ private:
|
|||
"LOCAL_FRAME_LAT", "LOCAL_FRAME_LON",
|
||||
};
|
||||
Error send_param(Parameter index);
|
||||
Error subscribe_message(uint8_t manager_system, uint8_t manager_component,
|
||||
uint32_t msgid);
|
||||
|
||||
uint8_t system_id;
|
||||
uint8_t component_id;
|
||||
|
||||
// TODO: Interpolate with some delay
|
||||
// Or not, in practice the simple solution works nicely
|
||||
Vector3 last_location;
|
||||
Quaternion last_rotation;
|
||||
Vector4 last_controls;
|
||||
Vector4 last_trim;
|
||||
|
||||
double time_passed;
|
||||
Timer *heartbeat_timer;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue