added a crank_state to general_state

This commit is contained in:
2026-06-02 18:06:32 +02:00
parent bca9d8816c
commit ce2b76e6c0

View File

@@ -4,12 +4,19 @@
#include <ring_buffer.h> #include <ring_buffer.h>
typedef enum { typedef enum {
SYNC_OK, SYNC_OK = 0,
SYNC_PENDING, SYNC_PENDING = 1,
SYNC_NOT_OK SYNC_NOT_OK = 2
} sync_state; } sync_state;
typedef enum {
CYCLE_EXHAUST = 0,
CYCLE_INTAKE = 1,
CYCLE_COMPRESSION = 2,
CYCLE_COMBUSTION = 3,
CYCLE_UNKNOWN = 4
} crank_state;
typedef struct { typedef struct {
crank_state cycle;
sync_state sync; sync_state sync;
ring_buffer_t crank_RB; ring_buffer_t crank_RB;
ring_buffer_t cam_RB; ring_buffer_t cam_RB;