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 examples/test_rpc_thread/test_rpc_thread.ino
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@


void rpc_thread_entry(void *p1, void *p2, void *p3) {
(void)p3; // unused argument

RpcCall<MsgPack::str_t> *call = reinterpret_cast<RpcCall<MsgPack::str_t>*>(p1);
struct k_mutex *mtx = reinterpret_cast<struct k_mutex*>(p2);

Expand Down
4 changes: 2 additions & 2 deletions extras/test/udp_echo/udp_echo.ino
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*/

#include <Arduino.h>
#include "src/Arduino_RouterBridge.h"
#include "Arduino_RouterBridge.h"

// Configuration
#define LOCAL_UDP_PORT 8888 // Local port to listen on
Expand Down Expand Up @@ -193,4 +193,4 @@ void printStatistics() {
}
Monitor.println("%)");
Monitor.println("===========================================\n");
}
}
4 changes: 2 additions & 2 deletions extras/test/udp_test/udp_test.ino
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

#include <Arduino.h>
#include "src/Arduino_RouterBridge.h"
#include "Arduino_RouterBridge.h"

// Test configuration
#define TEST_UDP_PORT 8888
Expand Down Expand Up @@ -372,4 +372,4 @@ void setup() {
void loop() {
// Test suite runs once in setup()
delay(1000);
}
}
10 changes: 6 additions & 4 deletions src/udp_bridge.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ class BridgeUDP final: public UDP {
}

uint8_t beginMulticast(IPAddress ip, uint16_t port) override {
(void)ip; // unused argument

if (!init()) {
return 0;
}
Expand Down Expand Up @@ -246,7 +248,7 @@ class BridgeUDP final: public UDP {
// reading stops when the UDP package has been read completely (_remaining = 0)
int read(unsigned char *buffer, size_t len) override {
k_mutex_lock(&udp_mutex, K_FOREVER);
int i = 0;
size_t i = 0;
while (_remaining && i < len) {
if (!temp_buffer.available() && !available()) {
k_msleep(1);
Expand All @@ -256,12 +258,12 @@ class BridgeUDP final: public UDP {
_remaining--;
}
k_mutex_unlock(&udp_mutex);
return i;
return (int)i;
}

int read(char *buffer, size_t len) override {
k_mutex_lock(&udp_mutex, K_FOREVER);
int i = 0;
size_t i = 0;
while (_remaining && i < len) {
if (!temp_buffer.available() && !available()) {
k_msleep(1);
Expand All @@ -271,7 +273,7 @@ class BridgeUDP final: public UDP {
_remaining--;
}
k_mutex_unlock(&udp_mutex);
return i;
return (int)i;
}

int peek() override {
Expand Down