Log FuelFlow -Reading 4 frequency inputs (digital on/off) and logging to SD card

The opening braces at lines 74 and 110 are spurious but harmless.

On line 131 it would be better to use the defined constants HIGH and LOW rather than literals 1 and 0.

On line 132 and throughout the remainder of this function I suggest calling micros() once (and saving the result to a local temporary variable) rather than calling it multiple times. As well as saving a tiny amount of processing time, it also avoids inaccuracies if the value changes between these calls.

All time values should be held as unsigned long, not (signed) long.

The code on line 215 seems to be in the wrong place (it is outside the if statement that tests whether the interval has passed). In general, I suggest putting the 'previous time' update as close as you can to the start of the block that executes when the interval has elapsed, so it is always visually obvious that you are updating it in the correct place. Also, I suggest that you update startTime by incrementing it by the interval rather than setting it to 'now'. This avoids timing slip that would otherwise occur if there is any latency between the interval elapsing and your code running that detects that it has elapsed. There will be a similar issue at line 230.

Since pgenPreviousMicros is only ever used inside pgen(), it doesn't need to be a global and could be defined as a static local inside pgen(). By reducing the scope of the variable you no longer need to think about other code when looking at how it may be used, and no longer need to think about this variable when understanding what the other code is doing.

The variable pgenInterval should be defined as unsigned long. Since you're using a value larger than an int in its initialisation expression, I suggest you use 1000000UL to make sure the compiler evaluates this expression using the correct type.

Values which you don't intend to change at runtime should be declared as const.

The issues above might explain why the pulse generation isn't working. If not, I suggest you post your revised code and we can see what else might be causing it.