Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Path: blob/master/libraries/AP_EFI/AP_EFI_Backend.cpp
Views: 1798
/*1This program is free software: you can redistribute it and/or modify2it under the terms of the GNU General Public License as published by3the Free Software Foundation, either version 3 of the License, or4(at your option) any later version.56This program is distributed in the hope that it will be useful,7but WITHOUT ANY WARRANTY; without even the implied warranty of8MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the9GNU General Public License for more details.1011You should have received a copy of the GNU General Public License12along with this program. If not, see <http://www.gnu.org/licenses/>.13*/1415#include "AP_EFI.h"1617#if HAL_EFI_ENABLED1819#include "AP_EFI_Backend.h"2021extern const AP_HAL::HAL &hal;2223AP_EFI_Backend::AP_EFI_Backend(AP_EFI &_frontend) :24frontend(_frontend)25{26}2728void AP_EFI_Backend::copy_to_frontend()29{30WITH_SEMAPHORE(frontend.sem);31frontend.state = internal_state;32}3334float AP_EFI_Backend::get_coef1(void) const35{36return frontend.coef1;37}3839float AP_EFI_Backend::get_coef2(void) const40{41return frontend.coef2;42}4344void AP_EFI_Backend::set_default_coef1(float coef1)45{46frontend.coef1.set_default(coef1);47}4849HAL_Semaphore &AP_EFI_Backend::get_sem(void)50{51return frontend.sem;52}5354float AP_EFI_Backend::get_ecu_fuel_density(void) const55{56return frontend.ecu_fuel_density;57}5859#if AP_EFI_THROTTLE_LINEARISATION_ENABLED60/*61linearise throttle if enabled62*/63float AP_EFI_Backend::linearise_throttle(float throttle_percent)64{65return frontend.throttle_linearisation.linearise_throttle(throttle_percent);66}67#endif // AP_EFI_THROTTLE_LINEARISATION_ENABLED6869#endif // HAL_EFI_ENABLED707172