Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Ardupilot
GitHub Repository: Ardupilot/ardupilot
Path: blob/master/Blimp/motors.cpp
9532 views
1
#include "Blimp.h"
2
3
#define ARM_DELAY 20 // called at 10hz so 2 seconds
4
#define DISARM_DELAY 20 // called at 10hz so 2 seconds
5
#define LOST_VEHICLE_DELAY 10 // called at 10hz so 1 second
6
7
// motors_output - send output to motors library which will adjust and send to ESCs and servos
8
void Blimp::motors_output()
9
{
10
// output any servo channels
11
SRV_Channels::calc_pwm();
12
13
auto &srv = AP::srv();
14
15
// cork now, so that all channel outputs happen at once
16
srv.cork();
17
18
// update output on any aux channels, for manual passthru
19
SRV_Channels::output_ch_all();
20
21
// send output signals to motors
22
motors->output();
23
24
// push all channels
25
srv.push();
26
}
27
28