Revision 737bd480
ID | 737bd480c2804eafbf35b37013d72c980d757d40 |
Added altitude_node and node_control
node_control listens to /mikrokopter/thrust, yaw, and velocity, and
publishes control messages using nav_lib. altitude_node publishes to
/mikrokopter/thrust using PID_control on barometer values.
mikrokopter/src/nav_lib.cpp | ||
---|---|---|
58 | 58 |
|
59 | 59 |
void MikrokopterControl::set_thrust(float thrust) |
60 | 60 |
{ |
61 |
if (thrust < 0) thrust = 0; |
|
62 |
if (thrust > 1) thrust = 1; |
|
61 | 63 |
int k = 255; |
62 | 64 |
control.thrust = k*thrust; |
63 | 65 |
} |
Also available in: Unified diff