added cam double trigger and pragma once in GS
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user