ublox_msg.h: remove #define min (#19718)
parent
24ce55c2c2
commit
d34a690136
|
@ -338,7 +338,7 @@ kj::Array<capnp::word> UbloxMsgParser::gen_mon_hw() {
|
||||||
bool UbloxMsgParser::add_data(const uint8_t *incoming_data, uint32_t incoming_data_len, size_t &bytes_consumed) {
|
bool UbloxMsgParser::add_data(const uint8_t *incoming_data, uint32_t incoming_data_len, size_t &bytes_consumed) {
|
||||||
int needed = needed_bytes();
|
int needed = needed_bytes();
|
||||||
if(needed > 0) {
|
if(needed > 0) {
|
||||||
bytes_consumed = min((size_t)needed, incoming_data_len );
|
bytes_consumed = std::min((uint32_t)needed, incoming_data_len );
|
||||||
// Add data to buffer
|
// Add data to buffer
|
||||||
memcpy(msg_parse_buf + bytes_in_parse_buf, incoming_data, bytes_consumed);
|
memcpy(msg_parse_buf + bytes_in_parse_buf, incoming_data, bytes_consumed);
|
||||||
bytes_in_parse_buf += bytes_consumed;
|
bytes_in_parse_buf += bytes_consumed;
|
||||||
|
|
|
@ -3,8 +3,6 @@
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include "messaging.hpp"
|
#include "messaging.hpp"
|
||||||
|
|
||||||
#define min(x, y) ((x) <= (y) ? (x) : (y))
|
|
||||||
|
|
||||||
// NAV_PVT
|
// NAV_PVT
|
||||||
typedef struct __attribute__((packed)) {
|
typedef struct __attribute__((packed)) {
|
||||||
uint32_t iTOW;
|
uint32_t iTOW;
|
||||||
|
|
Loading…
Reference in New Issue