fome-fw/firmware/controllers/algo/antilag_system_state_genera...

80 lines
2.0 KiB
C
Raw Normal View History

2022-12-16 17:29:31 -08:00
#pragma once
#include "rusefi_types.h"
struct antilag_system_state_s {
2023-03-27 01:38:48 -07:00
// offset 0 bit 0
2022-12-16 17:29:31 -08:00
bool isAntilagCondition : 1 {};
2023-03-27 01:38:48 -07:00
// offset 0 bit 1
2022-12-16 17:29:31 -08:00
bool ALSMinRPMCondition : 1 {};
2023-03-27 01:38:48 -07:00
// offset 0 bit 2
2022-12-16 17:29:31 -08:00
bool ALSMaxRPMCondition : 1 {};
2023-03-27 01:38:48 -07:00
// offset 0 bit 3
2022-12-16 17:29:31 -08:00
bool ALSMinCLTCondition : 1 {};
2023-03-27 01:38:48 -07:00
// offset 0 bit 4
2022-12-16 17:29:31 -08:00
bool ALSMaxCLTCondition : 1 {};
2023-03-27 01:38:48 -07:00
// offset 0 bit 5
2022-12-27 16:48:57 -08:00
bool ALSMaxThrottleIntentCondition : 1 {};
2023-03-27 01:38:48 -07:00
// offset 0 bit 6
2022-12-21 16:29:40 -08:00
bool isALSSwitchActivated : 1 {};
2023-03-27 01:38:48 -07:00
// offset 0 bit 7
2022-12-21 16:29:40 -08:00
bool ALSActivatePinState : 1 {};
2023-03-27 01:38:48 -07:00
// offset 0 bit 8
2022-12-21 16:29:40 -08:00
bool ALSSwitchCondition : 1 {};
2023-03-27 01:38:48 -07:00
// offset 0 bit 9
2023-02-06 15:07:21 -08:00
bool ALSTimerCondition : 1 {};
2023-03-27 01:38:48 -07:00
// offset 0 bit 10
2024-01-19 04:02:28 -08:00
bool unusedBit_0_10 : 1 {};
2023-03-27 01:38:48 -07:00
// offset 0 bit 11
2024-01-19 04:02:28 -08:00
bool unusedBit_0_11 : 1 {};
2023-03-27 01:38:48 -07:00
// offset 0 bit 12
2024-01-19 04:02:28 -08:00
bool unusedBit_0_12 : 1 {};
2023-03-27 01:38:48 -07:00
// offset 0 bit 13
2024-01-19 04:02:28 -08:00
bool unusedBit_0_13 : 1 {};
2023-03-27 01:38:48 -07:00
// offset 0 bit 14
2024-01-19 04:02:28 -08:00
bool unusedBit_0_14 : 1 {};
2023-03-27 01:38:48 -07:00
// offset 0 bit 15
2024-01-19 04:02:28 -08:00
bool unusedBit_0_15 : 1 {};
2023-03-27 01:38:48 -07:00
// offset 0 bit 16
2024-01-19 04:02:28 -08:00
bool unusedBit_0_16 : 1 {};
2023-03-27 01:38:48 -07:00
// offset 0 bit 17
2024-01-19 04:02:28 -08:00
bool unusedBit_0_17 : 1 {};
2023-03-27 01:38:48 -07:00
// offset 0 bit 18
2024-01-19 04:02:28 -08:00
bool unusedBit_0_18 : 1 {};
2023-03-27 01:38:48 -07:00
// offset 0 bit 19
2024-01-19 04:02:28 -08:00
bool unusedBit_0_19 : 1 {};
2023-03-27 01:38:48 -07:00
// offset 0 bit 20
2024-01-19 04:02:28 -08:00
bool unusedBit_0_20 : 1 {};
2023-03-27 01:38:48 -07:00
// offset 0 bit 21
2024-01-19 04:02:28 -08:00
bool unusedBit_0_21 : 1 {};
2023-03-27 01:38:48 -07:00
// offset 0 bit 22
2024-01-19 04:02:28 -08:00
bool unusedBit_0_22 : 1 {};
2023-03-27 01:38:48 -07:00
// offset 0 bit 23
2024-01-19 04:02:28 -08:00
bool unusedBit_0_23 : 1 {};
2023-03-27 01:38:48 -07:00
// offset 0 bit 24
2024-01-19 04:02:28 -08:00
bool unusedBit_0_24 : 1 {};
2023-03-27 01:38:48 -07:00
// offset 0 bit 25
2024-01-19 04:02:28 -08:00
bool unusedBit_0_25 : 1 {};
2023-03-27 01:38:48 -07:00
// offset 0 bit 26
2024-01-19 04:02:28 -08:00
bool unusedBit_0_26 : 1 {};
2023-03-27 01:38:48 -07:00
// offset 0 bit 27
2024-01-19 04:02:28 -08:00
bool unusedBit_0_27 : 1 {};
2023-03-27 01:38:48 -07:00
// offset 0 bit 28
2024-01-19 04:02:28 -08:00
bool unusedBit_0_28 : 1 {};
2023-03-27 01:38:48 -07:00
// offset 0 bit 29
2024-01-19 04:02:28 -08:00
bool unusedBit_0_29 : 1 {};
2023-03-27 01:38:48 -07:00
// offset 0 bit 30
2024-01-19 04:02:28 -08:00
bool unusedBit_0_30 : 1 {};
2023-03-27 01:38:48 -07:00
// offset 0 bit 31
2024-01-19 04:02:28 -08:00
bool unusedBit_0_31 : 1 {};
2023-03-27 01:38:48 -07:00
// offset 4
2022-12-21 15:52:17 -08:00
float fuelALSCorrection = (float)0;
2023-03-27 01:38:48 -07:00
// deg
// offset 8
2022-12-21 16:29:40 -08:00
scaled_channel<int16_t, 100, 1> timingALSCorrection = (int16_t)0;
2023-03-27 01:38:48 -07:00
// offset 10
2022-12-21 16:29:40 -08:00
uint8_t alignmentFill_at_10[2];
2022-12-16 17:29:31 -08:00
};
2022-12-21 16:29:40 -08:00
static_assert(sizeof(antilag_system_state_s) == 12);
2024-01-19 04:02:28 -08:00
static_assert(offsetof(antilag_system_state_s, fuelALSCorrection) == 4);
static_assert(offsetof(antilag_system_state_s, timingALSCorrection) == 8);
2022-12-16 17:29:31 -08:00