logging of live data structs was: data points #3614

This commit is contained in:
rusefillc 2022-06-29 03:13:35 -04:00
parent c0960270a8
commit 8acbf9d8df
5 changed files with 7 additions and 20 deletions

View File

@ -253,19 +253,12 @@ uint16_t rpmAcceleration;dRPM;"RPM/s",1, 0, 0, 5, 0
int16_t autoscale tps12Split;;"%",{1/@@PACK_MULT_PERCENT@@}, 0, 0, 0, 0
int16_t autoscale accPedalSplit;;"%",{1/@@PACK_MULT_PERCENT@@}, 0, 0, 0, 0
int16_t autoscale m_requested_pump;DI: Pump Angle;"deg",{1/@@PACK_MULT_ANGLE@@}, 0, 0, 0, 0
int16_t autoscale boostControlTarget;@@GAUGE_NAME_BOOST_TARGET@@;"kPa",{1/@@PACK_MULT_PRESSURE@@}, 0, 0, 0, 0
int8_t autoscale sparkCutReason;Spark Cut Code;"code",1, 0, 0, 0, 0
int8_t autoscale fuelCutReason;Fuel Cut Code;"code",1, 0, 0, 0, 0
float fuel_requested_percent;DI: fuel_requested_percent;"v", 1, 0, 0, 100, 0
float fuel_requested_percent_pi;DI: fuel_requested_percent_pi;"v", 1, 0, 0, 100, 0
float m_I_sum_percent;DI: m_I_sum_percent;"v", 1, 0, 0, 100, 0
float m_pressureTarget_kPa;DI: m_pressureTarget_kPa;"v", 1, 0, 0, 100, 0
uint16_t autoscale mafEstimate;@@GAUGE_NAME_AIR_FLOW_ESTIMATE@@;"kg/h",{1/@@PACK_MULT_MASS_FLOW@@}, 0, 0, 0, 0
uint16_t instantRpm;;"rpm", 1, 0, 0, 0, 0
float di_nextStart;DI: next start;"v", 1, 0, 0, 100, 0
uint16_t systemEventReuse;;"counter", 1, 0, 0, 0, 0
uint16_t autoscale rawMap;;"V",{1/@@PACK_MULT_VOLTAGE@@}, 0, 0, 5, 3
@ -301,7 +294,6 @@ uint16_t rpmAcceleration;dRPM;"RPM/s",1, 0, 0, 5, 0
uint16_t autoscale fallbackMap;;"kPa", 0.1, 0, 0, 1000, 1
int8_t autoscale boostControllerClosedLoopPart;@@GAUGE_NAME_BOOST_CLOSED_LOOP@@;"%", 0.5, 0, -50, 50, 1
uint8_t detectedGear;@@GAUGE_NAME_DETECTED_GEAR@@;"", 1, 0, 0, @@GEARS_COUNT@@, 0
uint16_t autoscale instantMAPValue;Instant MAP;"kPa",{1/@@PACK_MULT_PRESSURE@@}, 0, 0, 655, 2

View File

@ -118,9 +118,8 @@ percent_t BoostController::getClosedLoopImpl(float target, float manifoldPressur
}
expected<percent_t> BoostController::getClosedLoop(float target, float manifoldPressure) {
closedLoopPart = getClosedLoopImpl(target, manifoldPressure);
boostControllerClosedLoopPart = getClosedLoopImpl(target, manifoldPressure);
engine->outputChannels.boostControllerClosedLoopPart = closedLoopPart;
m_pid.postState(engine->outputChannels.boostStatus);
#if EFI_TUNER_STUDIO

View File

@ -7,7 +7,8 @@ bit isNotClosedLoop;
bit isZeroRpm
float openLoopPart;
float closedLoopPart;
int8_t autoscale boostControllerClosedLoopPart;@@GAUGE_NAME_BOOST_CLOSED_LOOP@@;"%", 0.5, 0, -50, 50, 1
int16_t autoscale boostControlTarget;@@GAUGE_NAME_BOOST_TARGET@@;"kPa",{1/@@PACK_MULT_PRESSURE@@}, 0, 0, 0, 0
end_struct

View File

@ -157,11 +157,6 @@ void HpfpController::onFastCallback() {
scheduleNextCycle();
}
}
engine->outputChannels.m_requested_pump = m_requested_pump;
engine->outputChannels.fuel_requested_percent = fuel_requested_percent;
engine->outputChannels.fuel_requested_percent_pi = fuel_requested_percent_pi;
engine->outputChannels.m_I_sum_percent = m_quantity.m_I_sum_percent;
engine->outputChannels.m_pressureTarget_kPa = m_quantity.m_pressureTarget_kPa;
}
void HpfpController::pinTurnOn(HpfpController *self) {
@ -193,15 +188,14 @@ void HpfpController::scheduleNextCycle() {
angleAboveMin = angle_requested > engineConfiguration->hpfpMinAngle;
if (angleAboveMin) {
nextStart = lobe - angle_requested - m_deadtime;
engine->outputChannels.di_nextStart = nextStart;
di_nextStart = lobe - angle_requested - m_deadtime;
/**
* We are good to use just one m_event instance because new events are scheduled when we turn off valve.
*/
engine->module<TriggerScheduler>()->scheduleOrQueue(
&m_event, TRIGGER_EVENT_UNDEFINED, 0,
nextStart,
di_nextStart,
{ pinTurnOn, this });
// Off will be scheduled after turning the valve on

View File

@ -7,6 +7,7 @@ bit noValve
bit angleAboveMin
bit isHpfpInactive
angle_t nextLobe
angle_t nextStart
float di_nextStart;DI: next start;"v", 1, 0, 0, 100, 0
end_struct