Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/Parse_NMEA.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -229,5 +229,7 @@ const char * sempNmeaGetStateName(const SEMP_PARSE_STATE *parse)
return "sempNmeaChecksumByte2";
if (parse->state == sempNmeaLineTermination)
return "sempNmeaLineTermination";
if (parse->state == sempNmeaHashPreamble)
return "sempNmeaHashPreamble";
return nullptr;
}
31 changes: 0 additions & 31 deletions src/Parse_Unicore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,37 +15,6 @@ should need to be listed in SparkFun_Extensible_Message_Parser.h.
#include "SparkFun_Extensible_Message_Parser.h"
#include "semp_crc32.h"

//----------------------------------------
// Constants
//----------------------------------------

#define UNICORE_HEADER_LENGTH ((uint16_t)24)
#define UNICORE_OFFSET_HEADER_MESSAGE_LENGTH ((uint16_t)6)

//----------------------------------------
// Structure definitions
//----------------------------------------

typedef struct _SEMP_UNICORE_HEADER
{
uint8_t syncA; // 0xaa
uint8_t syncB; // 0x44
uint8_t syncC; // 0xb5
uint8_t cpuIdlePercent; // CPU Idle Percentage 0-100
uint16_t messageId; // Message ID
uint16_t messageLength; // Message Length
uint8_t referenceTime; // Reference time(GPST or BDST)
uint8_t timeStatus; // Time status
uint16_t weekNumber; // Reference week number
uint32_t secondsOfWeek; // GPS seconds from the beginning of the
// reference week, accurate to the millisecond
uint32_t RESERVED;

uint8_t releasedVersion; // Release version
uint8_t leapSeconds; // Leap sec
uint16_t outputDelayMSec; // Output delay time, ms
} SEMP_UNICORE_HEADER;

//----------------------------------------
// Support routines
//----------------------------------------
Expand Down
25 changes: 25 additions & 0 deletions src/SparkFun_Extensible_Message_Parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,31 @@ typedef struct _SEMP_PARSE_STATE
// parserCount means searching for preamble
} SEMP_PARSE_STATE;

//----------------------------------------
// Protocol specific types
//----------------------------------------

// Define the Unicore message header
typedef struct _SEMP_UNICORE_HEADER
{
uint8_t syncA; // 0xaa
uint8_t syncB; // 0x44
uint8_t syncC; // 0xb5
uint8_t cpuIdlePercent; // CPU Idle Percentage 0-100
uint16_t messageId; // Message ID
uint16_t messageLength; // Message Length
uint8_t referenceTime; // Reference time(GPST or BDST)
uint8_t timeStatus; // Time status
uint16_t weekNumber; // Reference week number
uint32_t secondsOfWeek; // GPS seconds from the beginning of the
// reference week, accurate to the millisecond
uint32_t RESERVED;

uint8_t releasedVersion; // Release version
uint8_t leapSeconds; // Leap sec
uint16_t outputDelayMSec; // Output delay time, ms
} SEMP_UNICORE_HEADER;

//----------------------------------------
// Support routines
//----------------------------------------
Expand Down