Fix datatype bug in roller speed

master
Tom Wilson 3 years ago
parent 4f7f4c18bc
commit 59a1462abb

@ -14,8 +14,8 @@ typedef enum { EDGE_POS = 0, EDGE_NEG = 1 } edge_type_t;
// Struct to hold all the current data for tracking the pulse edges - only used within the pulse interrupt
typedef struct {
uint32_t edge_count = 0; // Running count of this type of edge
int64_t last_edge_precision_time = 0; // Precision timer value of most recent edge
uint32_t last_edge_timestamp = 0; // Also store timestamp as microseconds since start to avoid overflow of the
uint32_t last_edge_precision_time = 0; // Precision timer value of most recent edge
int64_t last_edge_timestamp = 0; // Also store timestamp as microseconds since start to avoid overflow of the
// precision timer when checking for stop
bool edge_seen = false; // Track if if first pulse edge has been seen yet to compare to
} edge_record_t;

Loading…
Cancel
Save