Skip to content

Commit ddfcfdd

Browse files
committed
fix: completes previous
1 parent b92c319 commit ddfcfdd

File tree

3 files changed

+36
-5
lines changed

3 files changed

+36
-5
lines changed

library.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"name": "Arduino_BridgeImola",
3+
"keywords": "rpclite,msgpack",
4+
"description": "A RPC bridge for Imola boards",
5+
"repository": {
6+
"type": "git",
7+
"url": "https://github.com/bcmi-labs/Arduino_BridgeImola"
8+
},
9+
"authors": {
10+
"name": "BCMI-labs",
11+
"url": "https://github.com/bcmi-labs/Arduino_BridgeImola",
12+
"maintainer": true
13+
},
14+
"version": "0.0.1",
15+
"license": "MIT",
16+
"frameworks": "arduino",
17+
"platforms": "*",
18+
"dependencies":
19+
{
20+
"bcmi-labs/Arduino_RPClite": ">=0.0.1"
21+
}
22+
}

library.properties

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name=Arduino_BridgeImola
2+
version=0.0.1
3+
author=BCMI-labs
4+
maintainer=BCMI-labs
5+
sentence=A RPC bridge for Imola boards
6+
paragraph=This library provides a simple RPC bridge for Imola boards, allowing communication between the board and other devices using MsgPack serialization.
7+
category=Communication
8+
url=https://www.arduino.cc/
9+
architectures=*
10+
depends=Arduino_RPClite (>=0.0.1)

src/bridge.h

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@
66
#include <Arduino_RPClite.h>
77

88

9-
class Bridge: {
9+
class Bridge {
1010

1111
RPCClient* client = nullptr;
1212
RPCServer* server = nullptr;
1313
ITransport* transport;
1414

1515
public:
1616
Bridge(ITransport& t) : transport(&t) {}
17-
Bridge(Stream& stream) : {
17+
Bridge(Stream& stream) {
1818
transport = new SerialTransport(stream);
1919
}
2020

@@ -25,7 +25,7 @@ class Bridge: {
2525
}
2626

2727
template<typename F>
28-
bool provide(const MsgPack::str_t& name, F&& func){
28+
bool provide(const MsgPack::str_t& name, F&& func) {
2929
return server->bind(name, func);
3030
}
3131

@@ -51,7 +51,6 @@ class Bridge: {
5151
return (uint8_t) client->lastError.code;
5252
}
5353

54-
}
55-
54+
};
5655

5756
#endif // BRIDGE_IMOLA_H

0 commit comments

Comments
 (0)