@@ -55,81 +55,81 @@ typedef enum
5555 UM980_RESULT_RESPONSE_COMMAND_WAITING,
5656} Um980Result;
5757
58- const uint8_t um980BinarySyncA = 0xAA ;
59- const uint8_t um980BinarySyncB = 0x44 ;
60- const uint8_t um980BinarySyncC = 0xB5 ;
61- const uint8_t um980ASCIISyncEnd = ' \n ' ;
62- const uint16_t um980HeaderLength = 24 ;
63-
64- const uint16_t offsetHeaderSyncA = 0 ;
65- const uint16_t offsetHeaderSyncB = 1 ;
66- const uint16_t offsetHeaderSyncC = 2 ;
67- const uint16_t offsetHeaderCpuIdle = 3 ;
68- const uint16_t offsetHeaderMessageId = 4 ;
69- const uint16_t offsetHeaderMessageLength = 6 ;
70- const uint16_t offsetHeaderReferenceTime = 8 ;
71- const uint16_t offsetHeaderTimeStatus = 9 ;
72- const uint16_t offsetHeaderWeekNumber = 10 ;
73- const uint16_t offsetHeaderSecondsOfWeek = 12 ;
74- const uint16_t offsetHeaderReleaseVersion = 20 ;
75- const uint16_t offsetHeaderLeapSecond = 21 ;
76- const uint16_t offsetHeaderOutputDelay = 22 ;
58+ # define um980BinarySyncA (( uint8_t ) 0xAA )
59+ # define um980BinarySyncB (( uint8_t ) 0x44 )
60+ # define um980BinarySyncC (( uint8_t ) 0xB5 )
61+ # define um980ASCIISyncEnd (( uint8_t ) ' \n ' )
62+
63+ # define um980HeaderLength (( uint16_t ) 24 )
64+ # define offsetHeaderSyncA (( uint16_t ) 0 )
65+ # define offsetHeaderSyncB (( uint16_t ) 1 )
66+ # define offsetHeaderSyncC (( uint16_t ) 2 )
67+ # define offsetHeaderCpuIdle (( uint16_t ) 3 )
68+ # define offsetHeaderMessageId (( uint16_t ) 4 )
69+ # define offsetHeaderMessageLength (( uint16_t ) 6 )
70+ # define offsetHeaderReferenceTime (( uint16_t ) 8 )
71+ # define offsetHeaderTimeStatus (( uint16_t ) 9 )
72+ # define offsetHeaderWeekNumber (( uint16_t ) 10 )
73+ # define offsetHeaderSecondsOfWeek (( uint16_t ) 12 )
74+ # define offsetHeaderReleaseVersion (( uint16_t ) 20 )
75+ # define offsetHeaderLeapSecond (( uint16_t ) 21 )
76+ # define offsetHeaderOutputDelay (( uint16_t ) 22 )
7777
7878// VERSIONB
79- const uint16_t messageIdVersion = 37 ;
80- const uint16_t offsetVersionModuleType = 0 ;
81- const uint16_t offsetVersionFirmwareVersion = 4 ;
82- const uint16_t offsetVersionAuth = 37 ;
83- const uint16_t offsetVersionPsn = 166 ;
84- const uint16_t offsetVersionEfuseID = 232 ;
85- const uint16_t offsetVersionCompTime = 265 ;
79+ # define messageIdVersion (( uint16_t ) 37 )
80+ # define offsetVersionModuleType (( uint16_t ) 0 )
81+ # define offsetVersionFirmwareVersion (( uint16_t ) 4 )
82+ # define offsetVersionAuth (( uint16_t ) 37 )
83+ # define offsetVersionPsn (( uint16_t ) 166 )
84+ # define offsetVersionEfuseID (( uint16_t ) 232 )
85+ # define offsetVersionCompTime (( uint16_t ) 265 )
8686
8787// BESTNAVB contains HPA, sats tracked/used, lat/long, RTK status, fix status
88- const uint16_t messageIdBestnav = 2118 ;
89- const uint16_t offsetBestnavPsolStatus = 0 ;
90- const uint16_t offsetBestnavPosType = 4 ;
91- const uint16_t offsetBestnavLat = 8 ;
92- const uint16_t offsetBestnavLon = 16 ;
93- const uint16_t offsetBestnavHgt = 24 ;
94- const uint16_t offsetBestnavLatDeviation = 40 ;
95- const uint16_t offsetBestnavLonDeviation = 44 ;
96- const uint16_t offsetBestnavHgtDeviation = 48 ;
97- const uint16_t offsetBestnavSatsTracked = 64 ;
98- const uint16_t offsetBestnavSatsUsed = 65 ;
99- const uint16_t offsetBestnavExtSolStat = 69 ;
100- const uint16_t offsetBestnavVelType = 76 ;
101- const uint16_t offsetBestnavHorSpd = 88 ;
102- const uint16_t offsetBestnavTrkGnd = 96 ;
103- const uint16_t offsetBestnavVertSpd = 104 ;
104- const uint16_t offsetBestnavVerspdStd = 112 ;
105- const uint16_t offsetBestnavHorspdStd = 116 ;
88+ # define messageIdBestnav (( uint16_t ) 2118 )
89+ # define offsetBestnavPsolStatus (( uint16_t ) 0 )
90+ # define offsetBestnavPosType (( uint16_t ) 4 )
91+ # define offsetBestnavLat (( uint16_t ) 8 )
92+ # define offsetBestnavLon (( uint16_t ) 16 )
93+ # define offsetBestnavHgt (( uint16_t ) 24 )
94+ # define offsetBestnavLatDeviation (( uint16_t ) 40 )
95+ # define offsetBestnavLonDeviation (( uint16_t ) 44 )
96+ # define offsetBestnavHgtDeviation (( uint16_t ) 48 )
97+ # define offsetBestnavSatsTracked (( uint16_t ) 64 )
98+ # define offsetBestnavSatsUsed (( uint16_t ) 65 )
99+ # define offsetBestnavExtSolStat (( uint16_t ) 69 )
100+ # define offsetBestnavVelType (( uint16_t ) 76 )
101+ # define offsetBestnavHorSpd (( uint16_t ) 88 )
102+ # define offsetBestnavTrkGnd (( uint16_t ) 96 )
103+ # define offsetBestnavVertSpd (( uint16_t ) 104 )
104+ # define offsetBestnavVerspdStd (( uint16_t ) 112 )
105+ # define offsetBestnavHorspdStd (( uint16_t ) 116 )
106106
107107// BESTNAVXYZB
108- const uint16_t messageIdBestnavXyz = 240 ;
109- const uint16_t offsetBestnavXyzPsolStatus = 0 ;
110- const uint16_t offsetBestnavXyzPosType = 4 ;
111- const uint16_t offsetBestnavXyzPX = 8 ;
112- const uint16_t offsetBestnavXyzPY = 16 ;
113- const uint16_t offsetBestnavXyzPZ = 24 ;
114- const uint16_t offsetBestnavXyzPXDeviation = 32 ;
115- const uint16_t offsetBestnavXyzPYDeviation = 36 ;
116- const uint16_t offsetBestnavXyzPZDeviation = 40 ;
117- const uint16_t offsetBestnavXyzSatsTracked = 104 ;
118- const uint16_t offsetBestnavXyzSatsUsed = 105 ;
119- const uint16_t offsetBestnavXyzExtSolStat = 109 ;
108+ # define messageIdBestnavXyz (( uint16_t ) 240 )
109+ # define offsetBestnavXyzPsolStatus (( uint16_t ) 0 )
110+ # define offsetBestnavXyzPosType (( uint16_t ) 4 )
111+ # define offsetBestnavXyzPX (( uint16_t ) 8 )
112+ # define offsetBestnavXyzPY (( uint16_t ) 16 )
113+ # define offsetBestnavXyzPZ (( uint16_t ) 24 )
114+ # define offsetBestnavXyzPXDeviation (( uint16_t ) 32 )
115+ # define offsetBestnavXyzPYDeviation (( uint16_t ) 36 )
116+ # define offsetBestnavXyzPZDeviation (( uint16_t ) 40 )
117+ # define offsetBestnavXyzSatsTracked (( uint16_t ) 104 )
118+ # define offsetBestnavXyzSatsUsed (( uint16_t ) 105 )
119+ # define offsetBestnavXyzExtSolStat (( uint16_t ) 109 )
120120
121121// RECTIMEB for time/date
122- const uint16_t messageIdRectime = 102 ;
123- const uint16_t offsetRectimeClockStatus = 0 ;
124- const uint16_t offsetRectimeOffset = 4 ;
125- const uint16_t offsetRectimeOffsetStd = 12 ;
126- const uint16_t offsetRectimeUtcYear = 28 ;
127- const uint16_t offsetRectimeUtcMonth = 32 ;
128- const uint16_t offsetRectimeUtcDay = 33 ;
129- const uint16_t offsetRectimeUtcHour = 34 ;
130- const uint16_t offsetRectimeUtcMinute = 35 ;
131- const uint16_t offsetRectimeUtcMillisecond = 36 ;
132- const uint16_t offsetRectimeUtcStatus = 40 ;
122+ # define messageIdRectime (( uint16_t ) 102 )
123+ # define offsetRectimeClockStatus (( uint16_t ) 0 )
124+ # define offsetRectimeOffset (( uint16_t ) 4 )
125+ # define offsetRectimeOffsetStd (( uint16_t ) 12 )
126+ # define offsetRectimeUtcYear (( uint16_t ) 28 )
127+ # define offsetRectimeUtcMonth (( uint16_t ) 32 )
128+ # define offsetRectimeUtcDay (( uint16_t ) 33 )
129+ # define offsetRectimeUtcHour (( uint16_t ) 34 )
130+ # define offsetRectimeUtcMinute (( uint16_t ) 35 )
131+ # define offsetRectimeUtcMillisecond (( uint16_t ) 36 )
132+ # define offsetRectimeUtcStatus (( uint16_t ) 40 )
133133
134134// HWSTATUS has temperature info, and voltage info
135135
0 commit comments