Stick Verbose Functinos : Make get functions for roll, pitch, yaw and throttle const to specify that it's not changing Sticks' internal variables

This commit is contained in:
Junwoo Hwang 2022-03-22 15:27:14 +01:00 committed by Matthias Grob
parent f78465428c
commit 0e5c305163

View File

@ -63,10 +63,10 @@ public:
const matrix::Vector<float, 4> &getPositionExpo() { return _positions_expo; };
// Helper functions to get stick values more intuitively
float getPitch() { return _positions(0); }
float getRoll() { return _positions(1); }
float getThrottle() { return -_positions(2); } // Convert Z-axis(down) command to Up-axis frame
float getYaw() { return _positions(3); }
float getPitch() const { return _positions(0); }
float getRoll() const { return _positions(1); }
float getThrottle() const { return -_positions(2); } // Convert Z-axis(down) command to Up-axis frame
float getYaw() const { return _positions(3); }
/**
* Limit the the horizontal input from a square shaped joystick gimbal to a unit circle