Skip to content

Commit

Permalink
add version field and change header
Browse files Browse the repository at this point in the history
  • Loading branch information
jlashner committed Mar 26, 2024
1 parent 9e31fcc commit 7b6bfb1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions hwp_encoder/Beaglebone_Encoder_DAQ.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ struct EncoderInfo {
// IRIG packet
struct IrigInfo{
unsigned long int header;
unsigned long int version;
unsigned long int clock;
unsigned long int clock_overflow;
unsigned long int packet_count;
Expand Down
7 changes: 5 additions & 2 deletions hwp_encoder/IRIG_Detection.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ struct ECAP {
struct IrigInfo {
// IRIG header
unsigned long int header;
unsigned long int version;
// Rising edge time
unsigned long int clock;
// Number of overflows that have occurred
Expand Down Expand Up @@ -211,8 +212,10 @@ int main(void) {

// Initialize two IRIG packets
// Set IRIG headers for both IRIG packets
irig_packets[0].header = 0xCAFE;
irig_packets[1].header = 0xCAFE;
irig_packets[0].header = 0xCAFF;
irig_packets[0].header = 0xCAFF;
irig_packets[1].version = 1;
irig_packets[1].version = 1;

// Sample for DAQ_HOURS number of hours
x = 0;
Expand Down

0 comments on commit 7b6bfb1

Please sign in to comment.