Browse Source

Fix type usage compile errors for Windows

Evgeniy Novikov 9 years ago
parent
commit
78556230bc
2 changed files with 6 additions and 6 deletions
  1. 1 1
      ubx.c
  2. 5 5
      ubxmessage.h

+ 1 - 1
ubx.c

@@ -130,7 +130,7 @@ struct UBXMsgBuffer getCFG_MSG_RATES(enum UBXMessageClass msgClass, enum UBXMess
     initMsg(msg, payloadSize, UBXMsgClassCFG, UBXMsgIdCFG_MSG);
     msg->payload.CFG_MSG_RATES.msgClass = msgClass;
     msg->payload.CFG_MSG_RATES.msgId = msgId;
-    memcpy(msg->payload.CFG_MSG_RATES.rate, rate, 6*sizeof(u_int8_t));
+    memcpy(msg->payload.CFG_MSG_RATES.rate, rate, 6*sizeof(UBXU1_t));
     completeMsg(&buffer, payloadSize);
     return buffer;
 }

+ 5 - 5
ubxmessage.h

@@ -53,10 +53,6 @@
 //#endif
 //#endif
 
-static const int UBX_CHECKSUM_SIZE = 2;
-static const int UBX_HEADER_SIZE = 6;
-static const u_int16_t UBX_PREAMBLE = 0xB562;
-
 #if defined (__linux__)
 typedef u_int8_t  UBXU1_t;
 typedef int8_t    UBXI1_t;
@@ -85,6 +81,10 @@ typedef double         UBXR8_t;
 typedef char           UBXCH_t;
 #endif
 
+static const int UBX_CHECKSUM_SIZE = 2;
+static const int UBX_HEADER_SIZE = 6;
+static const UBXU2_t UBX_PREAMBLE = 0xB562;
+
 enum UBXMessageClass
 {
     UBXMsgClassNAV = 0x01,
@@ -2105,7 +2105,7 @@ struct UBXAlpFileInfo
 
 struct UBXMsg
 {
-    u_int16_t preamble;
+    UBXU2_t preamble;
     struct UBXHdr hdr;
     union UBXMsgs payload;
 };