one step sideways to fix build
This commit is contained in:
parent
b271f54214
commit
82f608d558
|
@ -669,7 +669,7 @@ static EtbImpl<EtbController1> etb1;
|
||||||
static EtbImpl<EtbController2> etb2;
|
static EtbImpl<EtbController2> etb2;
|
||||||
|
|
||||||
static_assert(ETB_COUNT == 2);
|
static_assert(ETB_COUNT == 2);
|
||||||
static EtbController* etbControllers[] = { &etb1, &etb2 };
|
EtbController* etbControllers[] = { &etb1, &etb2 };
|
||||||
|
|
||||||
struct EtbThread final : public PeriodicController<512> {
|
struct EtbThread final : public PeriodicController<512> {
|
||||||
EtbThread() : PeriodicController("ETB", PRIO_ETB, ETB_LOOP_FREQUENCY) {}
|
EtbThread() : PeriodicController("ETB", PRIO_ETB, ETB_LOOP_FREQUENCY) {}
|
||||||
|
|
|
@ -40,7 +40,6 @@
|
||||||
#include "gear_detector.h"
|
#include "gear_detector.h"
|
||||||
#include "advance_map.h"
|
#include "advance_map.h"
|
||||||
#include "fan_control.h"
|
#include "fan_control.h"
|
||||||
#include "electronic_throttle_impl.h"
|
|
||||||
|
|
||||||
#ifndef EFI_UNIT_TEST
|
#ifndef EFI_UNIT_TEST
|
||||||
#error EFI_UNIT_TEST must be defined!
|
#error EFI_UNIT_TEST must be defined!
|
||||||
|
@ -167,7 +166,7 @@ public:
|
||||||
|
|
||||||
PinRepository pinRepository;
|
PinRepository pinRepository;
|
||||||
|
|
||||||
EtbController *etbControllers[ETB_COUNT] = {nullptr};
|
IEtbController *etbControllers[ETB_COUNT] = {nullptr};
|
||||||
IFuelComputer *fuelComputer = nullptr;
|
IFuelComputer *fuelComputer = nullptr;
|
||||||
|
|
||||||
type_list<
|
type_list<
|
||||||
|
|
|
@ -23,6 +23,10 @@ using namespace luaaa;
|
||||||
// Some functions lean on existing FSIO implementation
|
// Some functions lean on existing FSIO implementation
|
||||||
#include "fsio_impl.h"
|
#include "fsio_impl.h"
|
||||||
|
|
||||||
|
#if EFI_PROD_CODE
|
||||||
|
#include "electronic_throttle_impl.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
static int lua_readpin(lua_State* l) {
|
static int lua_readpin(lua_State* l) {
|
||||||
auto msg = luaL_checkstring(l, 1);
|
auto msg = luaL_checkstring(l, 1);
|
||||||
#if EFI_PROD_CODE
|
#if EFI_PROD_CODE
|
||||||
|
@ -533,13 +537,16 @@ void configureRusefiLuaHooks(lua_State* l) {
|
||||||
engine->engineState.luaAdjustments.fuelMult = luaL_checknumber(l, 1);
|
engine->engineState.luaAdjustments.fuelMult = luaL_checknumber(l, 1);
|
||||||
return 0;
|
return 0;
|
||||||
});
|
});
|
||||||
|
#if EFI_PROD_CODE
|
||||||
lua_register(l, "setEtbAdd", [](lua_State* l) {
|
lua_register(l, "setEtbAdd", [](lua_State* l) {
|
||||||
auto luaAdjustment = luaL_checknumber(l, 1);
|
auto luaAdjustment = luaL_checknumber(l, 1);
|
||||||
for (int i = 0 ; i < ETB_COUNT; i++) {
|
for (int i = 0 ; i < ETB_COUNT; i++) {
|
||||||
engine->etbControllers[i]->luaAdjustment = luaAdjustment;
|
extern EtbController* etbControllers[];
|
||||||
|
etbControllers[i]->luaAdjustment = luaAdjustment;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
});
|
});
|
||||||
|
#endif // EFI_PROD_CODE
|
||||||
|
|
||||||
lua_register(l, "setClutchUpState", [](lua_State* l) {
|
lua_register(l, "setClutchUpState", [](lua_State* l) {
|
||||||
engine->engineState.luaAdjustments.clutchUpState = lua_toboolean(l, 1);
|
engine->engineState.luaAdjustments.clutchUpState = lua_toboolean(l, 1);
|
||||||
|
|
Loading…
Reference in New Issue