added cam double trigger and pragma once in GS

This commit is contained in:
2026-06-03 11:35:21 +02:00
parent cfe15f2612
commit 0909c180e8
3 changed files with 6 additions and 3 deletions

View File

@@ -6,6 +6,7 @@
#include "cmsis_os2.h"
#include "macros.h"
#include "main.h"
#include "global_state.h"
#include "ring_buffer.h"
#include "tasks.h"
@@ -17,7 +18,10 @@ void camHandler(void *argument) {
ringBufferRead(&state_g.cam_RB, 0));
// FILTERS
if (CAM_TRIGD) {
ringBufferRevert(state_g.cam_RB,1);
return;
}
state_g.cam_state = CAM_TRIGD;
state_g.cam_miss_ctr = 0;
switch (state_g.sync_state) {

View File

@@ -15,7 +15,6 @@ void crankHandler(void *argument) {
DEBUG_LOG("Crank pulse detected at: %lu\n\r",
ringBufferRead(&state_g.crank_RB, 0));
// FILTER
// INCREMENT SWITCH
switch (state_g.crank_state) {
case CYCLE_COMPRESSION: {