mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-04 15:08:28 -04:00
32af63f734
Arming added for quadrotor. Need to add to rover still. Battery monitoring added with auto shut-off in quadrotor controller. Finally split apo header and source files to allow faster compiling/ fix cyclic header inclusions.
34 lines
706 B
C++
34 lines
706 B
C++
/*
|
|
* AP_Controller.cpp
|
|
*
|
|
* Created on: Apr 30, 2011
|
|
* Author: jgoppert
|
|
*/
|
|
|
|
#include "AP_Controller.h"
|
|
#include "AP_HardwareAbstractionLayer.h"
|
|
#include "../AP_Common/include/menu.h"
|
|
#include "AP_RcChannel.h"
|
|
|
|
namespace apo {
|
|
|
|
AP_Controller::AP_Controller(AP_Navigator * nav, AP_Guide * guide,
|
|
AP_HardwareAbstractionLayer * hal) :
|
|
_nav(nav), _guide(guide), _hal(hal) {
|
|
setAllRadioChannelsToNeutral();
|
|
}
|
|
|
|
void AP_Controller::setAllRadioChannelsToNeutral() {
|
|
for (uint8_t i = 0; i < _hal->rc.getSize(); i++) {
|
|
_hal->rc[i]->setPosition(0.0);
|
|
}
|
|
}
|
|
|
|
void AP_Controller::setAllRadioChannelsManually() {
|
|
for (uint8_t i = 0; i < _hal->rc.getSize(); i++) {
|
|
_hal->rc[i]->setUsingRadio();
|
|
}
|
|
}
|
|
|
|
}
|