mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-26 16:30:07 +08:00
[module] gas-engine idle trim & cut-off
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
<!DOCTYPE module SYSTEM "module.dtd">
|
||||
|
||||
<module name="gas_engine">
|
||||
<doc>
|
||||
<description>Gas Engine Idle</description>
|
||||
</doc>
|
||||
<header>
|
||||
<file name="gas_engine_idle_trim.h"/>
|
||||
</header>
|
||||
<periodic fun="periodic_gas_engine_idle_trim()" freq="10." autorun="TRUE"/>
|
||||
<makefile>
|
||||
<raw>
|
||||
</raw>
|
||||
<file name="gas_engine_idle_trim.c"/>
|
||||
</makefile>
|
||||
</module>
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
<!DOCTYPE settings SYSTEM "../settings.dtd">
|
||||
|
||||
<settings>
|
||||
<dl_settings>
|
||||
<dl_settings NAME="engine">
|
||||
<dl_setting MAX="9600" MIN="-9600" STEP="1" VAR="gas_engine_idle_trim_left" shortname="left" module="modules/gas_engine/gas_engine_idle_trim" />
|
||||
<dl_setting MAX="9600" MIN="-9600" STEP="1" VAR="gas_engine_idle_trim_right" shortname="right"/>
|
||||
</dl_settings>
|
||||
</dl_settings>
|
||||
</settings>
|
||||
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
* Copyright (C) 2014 Christophe De Wagter
|
||||
*
|
||||
* This file is part of paparazzi.
|
||||
*
|
||||
* paparazzi 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 2, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* paparazzi 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 paparazzi; see the file COPYING. If not, write to
|
||||
* the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "gas_engine_idle_trim.h"
|
||||
|
||||
int gas_engine_idle_trim_left = 0;
|
||||
int gas_engine_idle_trim_right = 0;
|
||||
|
||||
#include "inter_mcu.h"
|
||||
|
||||
|
||||
void periodic_gas_engine_idle_trim(void) {
|
||||
ap_state->commands[COMMAND_IDLE1] = fbw_state->channels[RADIO_GAIN1];
|
||||
ap_state->commands[COMMAND_IDLE2] = fbw_state->channels[RADIO_GAIN2];
|
||||
}
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
* Copyright (C) 2014 Christophe De Wagter
|
||||
*
|
||||
* This file is part of paparazzi.
|
||||
*
|
||||
* paparazzi 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 2, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* paparazzi 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 paparazzi; see the file COPYING. If not, write to
|
||||
* the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*
|
||||
*/
|
||||
|
||||
/** \file gas_engine_idle_trim.h
|
||||
*
|
||||
* handle idle throttle command and engine cut-off
|
||||
*/
|
||||
|
||||
#ifndef GAS_ENGINE_IDLE_TRIM_H
|
||||
#define GAS_ENGINE_IDLE_TRIM_H
|
||||
|
||||
extern int gas_engine_idle_trim_left;
|
||||
extern int gas_engine_idle_trim_right;
|
||||
|
||||
void periodic_gas_engine_idle_trim(void);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user