mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-03 00:31:36 +08:00
Corrected two small bugs considering arming and disarming
This commit is contained in:
@@ -37,7 +37,6 @@
|
|||||||
*
|
*
|
||||||
* PX4IO is connected via serial (or possibly some other interface at a later
|
* PX4IO is connected via serial (or possibly some other interface at a later
|
||||||
* point).
|
* point).
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
@@ -384,7 +383,7 @@ PX4IO::task_main()
|
|||||||
|
|
||||||
if (fds[2].revents & POLLIN) {
|
if (fds[2].revents & POLLIN) {
|
||||||
|
|
||||||
orb_copy(ORB_ID(actuator_armed), _t_armed, &_controls);
|
orb_copy(ORB_ID(actuator_armed), _t_armed, &_armed);
|
||||||
_send_needed = true;
|
_send_needed = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -538,7 +537,7 @@ PX4IO::ioctl(file *filep, int cmd, unsigned long arg)
|
|||||||
|
|
||||||
case PWM_SERVO_DISARM:
|
case PWM_SERVO_DISARM:
|
||||||
/* fake a disarmed transition */
|
/* fake a disarmed transition */
|
||||||
_armed.armed = true;
|
_armed.armed = false;
|
||||||
_send_needed = true;
|
_send_needed = true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user