more fuel info in verbose CAN (#3229)
* more fuel info * missed a comma
This commit is contained in:
parent
2e5a4b3691
commit
e5fef07db8
|
@ -120,16 +120,28 @@ struct Fueling {
|
|||
scaled_channel<uint16_t, 1000> cylAirmass;
|
||||
scaled_channel<uint16_t, 100> estAirflow;
|
||||
scaled_ms fuel_pulse;
|
||||
scaled_percent stft;
|
||||
uint16_t pad;
|
||||
};
|
||||
|
||||
static void populateFrame(Fueling& msg) {
|
||||
msg.cylAirmass = engine->engineState.sd.airMassInOneCylinder;
|
||||
msg.estAirflow = engine->engineState.airFlow;
|
||||
msg.fuel_pulse = engine->actualLastInjection[0];
|
||||
}
|
||||
|
||||
// todo
|
||||
msg.stft = 0;
|
||||
struct Fueling2 {
|
||||
scaled_channel<uint16_t> fuelConsumedGram;
|
||||
scaled_channel<uint16_t, PACK_MULT_FUEL_FLOW> fuelFlowRate;
|
||||
scaled_percent fuelTrim[2];
|
||||
};
|
||||
|
||||
static void populateFrame(Fueling2& msg) {
|
||||
msg.fuelConsumedGram = engine->engineState.fuelConsumption.getConsumedGrams();
|
||||
msg.fuelFlowRate = engine->engineState.fuelConsumption.getConsumptionGramPerSecond();
|
||||
|
||||
for (size_t i = 0; i < 2; i++) {
|
||||
msg.fuelTrim[i] = 100.0f * (ENGINE(stftCorrection)[i] - 1.0f);
|
||||
}
|
||||
}
|
||||
|
||||
void sendCanVerbose() {
|
||||
|
@ -141,6 +153,7 @@ void sendCanVerbose() {
|
|||
transmitStruct<Sensors1> (base + CAN_SENSOR_1_OFFSET);
|
||||
transmitStruct<Sensors2> (base + 4);
|
||||
transmitStruct<Fueling> (base + 5);
|
||||
transmitStruct<Fueling2> (base + 6);
|
||||
}
|
||||
|
||||
#endif // EFI_CAN_SUPPORT
|
||||
|
|
Loading…
Reference in New Issue