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