random progress
This commit is contained in:
parent
e77e80eeb6
commit
c93594cd1b
|
@ -46,7 +46,11 @@ void VvtController::PeriodicTask() {
|
||||||
}
|
}
|
||||||
|
|
||||||
expected<angle_t> VvtController::observePlant() const {
|
expected<angle_t> VvtController::observePlant() const {
|
||||||
|
#if EFI_SHAFT_POSITION_INPUT
|
||||||
return engine->triggerCentral.getVVTPosition(m_bank, m_cam);
|
return engine->triggerCentral.getVVTPosition(m_bank, m_cam);
|
||||||
|
#else
|
||||||
|
return unexpected;
|
||||||
|
#endif // EFI_SHAFT_POSITION_INPUT
|
||||||
}
|
}
|
||||||
|
|
||||||
expected<angle_t> VvtController::getSetpoint() {
|
expected<angle_t> VvtController::getSetpoint() {
|
||||||
|
|
|
@ -381,7 +381,9 @@ efitick_t scheduleByAngle(scheduling_s *timer, efitick_t edgeTimestamp, angle_t
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
RpmCalculator::RpmCalculator() {
|
RpmCalculator::RpmCalculator() :
|
||||||
|
StoredValueSensor(SensorType::Rpm, 0)
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -562,6 +562,7 @@ void configureRusefiLuaHooks(lua_State* l) {
|
||||||
return 1;
|
return 1;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
#if EFI_SHAFT_POSITION_INPUT
|
||||||
lua_register(l, "getEngineState", [](lua_State* l) {
|
lua_register(l, "getEngineState", [](lua_State* l) {
|
||||||
spinning_state_e state = engine->rpmCalculator.getState();
|
spinning_state_e state = engine->rpmCalculator.getState();
|
||||||
int luaStateCode;
|
int luaStateCode;
|
||||||
|
@ -576,6 +577,7 @@ void configureRusefiLuaHooks(lua_State* l) {
|
||||||
lua_pushnumber(l, luaStateCode);
|
lua_pushnumber(l, luaStateCode);
|
||||||
return 1;
|
return 1;
|
||||||
});
|
});
|
||||||
|
#endif //EFI_SHAFT_POSITION_INPUT
|
||||||
|
|
||||||
lua_register(l, "setCalibration", [](lua_State* l) {
|
lua_register(l, "setCalibration", [](lua_State* l) {
|
||||||
auto propertyName = luaL_checklstring(l, 1, nullptr);
|
auto propertyName = luaL_checklstring(l, 1, nullptr);
|
||||||
|
|
|
@ -46,6 +46,7 @@ size_t computeStftBin(int rpm, float load, stft_s& cfg) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool shouldCorrect() {
|
static bool shouldCorrect() {
|
||||||
|
#if EFI_SHAFT_POSITION_INPUT
|
||||||
const auto& cfg = engineConfiguration->stft;
|
const auto& cfg = engineConfiguration->stft;
|
||||||
|
|
||||||
// User disable bit
|
// User disable bit
|
||||||
|
@ -71,6 +72,9 @@ static bool shouldCorrect() {
|
||||||
|
|
||||||
// If all was well, then we're enabled!
|
// If all was well, then we're enabled!
|
||||||
return true;
|
return true;
|
||||||
|
#else
|
||||||
|
return false;
|
||||||
|
#endif // EFI_SHAFT_POSITION_INPUT
|
||||||
}
|
}
|
||||||
|
|
||||||
bool shouldUpdateCorrection(SensorType sensor) {
|
bool shouldUpdateCorrection(SensorType sensor) {
|
||||||
|
|
Loading…
Reference in New Issue