2015-05-12 04:00:25 -03:00
|
|
|
/*
|
|
|
|
This program is free software: you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
/*
|
|
|
|
main Rover class, containing all vehicle specific state
|
|
|
|
*/
|
|
|
|
|
2015-05-13 00:16:45 -03:00
|
|
|
#include "Rover.h"
|
2017-09-12 15:25:20 -03:00
|
|
|
|
|
|
|
#define FORCE_VERSION_H_INCLUDE
|
2016-05-05 19:10:08 -03:00
|
|
|
#include "version.h"
|
2017-09-12 15:25:20 -03:00
|
|
|
#undef FORCE_VERSION_H_INCLUDE
|
2015-05-13 00:16:45 -03:00
|
|
|
|
2015-05-12 04:00:25 -03:00
|
|
|
Rover::Rover(void) :
|
|
|
|
param_loader(var_info),
|
2016-10-28 13:57:14 -03:00
|
|
|
channel_steer(nullptr),
|
|
|
|
channel_throttle(nullptr),
|
2017-08-22 04:06:23 -03:00
|
|
|
channel_aux(nullptr),
|
2018-05-10 04:10:34 -03:00
|
|
|
channel_lateral(nullptr),
|
2017-12-12 21:06:15 -04:00
|
|
|
DataFlash{fwver.fw_string, g.log_bitmask},
|
2015-05-12 04:00:25 -03:00
|
|
|
modes(&g.mode1),
|
|
|
|
nav_controller(&L1_controller),
|
2017-07-18 23:19:08 -03:00
|
|
|
control_mode(&mode_initializing),
|
2017-05-17 20:09:21 -03:00
|
|
|
home(ahrs.get_home()),
|
2017-11-22 08:38:57 -04:00
|
|
|
G_Dt(0.02f),
|
|
|
|
mode_auto(mode_rtl)
|
2015-05-12 04:00:25 -03:00
|
|
|
{
|
|
|
|
}
|