Skip to content
This repository was archived by the owner on Jun 3, 2019. It is now read-only.
Open
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: 1 addition & 1 deletion apps/talker_stm32_timer/talker_stm32_timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ void tim5_vector(void)
return;
static char __attribute__((aligned(4))) msg[256] = {0};
static int pub_count = 0;
snprintf(&msg[4], sizeof(msg), "Hello World: %d", pub_count++);
snprintf(&msg[4], (sizeof(msg) - 4), "Hello World: %d", pub_count++);
uint32_t rtps_string_len = strlen(&msg[4]) + 1;
*((uint32_t *)msg) = rtps_string_len;
freertps_publish(g_pub, (uint8_t *)msg, rtps_string_len + 4);
Expand Down
4 changes: 2 additions & 2 deletions systems/samv71_xplained_ultra-metal/pin.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ void pin_set_mux(Pio *pio, const unsigned pin_idx,
pio->PIO_ABCDSR[0] &= ~pin_mask;
pio->PIO_ABCDSR[1] &= ~pin_mask;
// now , set the necessary bits
pio->PIO_ABCDSR[0] |= mux_idx & 0x1 ? pin_mask : 0;
pio->PIO_ABCDSR[1] |= mux_idx & 0x2 ? pin_mask : 0;
pio->PIO_ABCDSR[0] |= (mux_idx & 0x1) ? pin_mask : 0;
pio->PIO_ABCDSR[1] |= (mux_idx & 0x2) ? pin_mask : 0;
// and disable GPIO control of pin (that is, let the peripheral mux have it)
pio->PIO_PDR = pin_mask;
}
Expand Down
4 changes: 2 additions & 2 deletions udp.c
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,8 @@ static bool frudp_rx_heartbeat(RX_MSG_ARGS)
frudp_print_guid(&writer_guid);
printf(" => 0x%08x %d -> %d\n",
(unsigned)freertps_htonl(hb->reader_id.u),
(unsigned)hb->first_sn.low,
(unsigned)hb->last_sn.low);
(int)hb->first_sn.low,
(int)hb->last_sn.low);
#endif
//frudp_print_readers();

Expand Down
2 changes: 1 addition & 1 deletion utils/lightweightserial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ LightweightSerial::LightweightSerial(const char *port, int baud) :

// flush the buffer of the serial device
uint8_t b;
while (this->read(&b) > 0) { }
while (this->read(&b)) { }
happy = true;
}

Expand Down