Skip to content
This repository was archived by the owner on Mar 17, 2025. It is now read-only.

Commit a59eddd

Browse files
committed
Fixed some issues from PR review
1 parent 753f1ca commit a59eddd

File tree

4 files changed

+33
-30
lines changed

4 files changed

+33
-30
lines changed

examples/FirebaseSerialHost_ESP8266/FirebaseSerialHost_ESP8266.ino

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
//
1616

1717

18-
// FirebasePush_ESP8266 is a sample that will start our serial transciever
19-
// listening on a software port and allow debug over the main serial port.
18+
// A sample that will start our serial transciever listening on a software
19+
// port and allow debug over the main serial port.
2020
//
2121
// A suggested setup for testing this example would be a USB to TTL cable
2222
// with the green wire connected to pin 5 and the white wire connected to

src/SerialTransceiver.h

+3-28
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,3 @@
1-
#ifndef MODEM_SERIAL_TRANSCIEVER_H
2-
#define MODEM_SERIAL_TRANSCIEVER_H
3-
4-
#include <memory>
5-
6-
#include "Firebase.h"
7-
#include "modem/commands.h"
8-
9-
namespace firebase {
10-
namespace modem {
11-
12-
class SerialTransceiver {
13-
public:
14-
void begin(Stream* serial);
15-
void loop();
16-
17-
private:
18-
std::unique_ptr<Command> CreateCommand(const String& name, Firebase* fbase);
19-
20-
std::unique_ptr<Firebase> fbase_;
21-
std::unique_ptr<ArduinoInputStream> in_;
22-
std::unique_ptr<ArduinoOutputStream> out_;
23-
};
24-
25-
} // modem
26-
} // firebase
27-
28-
#endif // MODEM_SERIAL_TRANSCIEVER_H
1+
#include "modem/SerialTransceiver.h"
2+
// Bring them into the base namespace for easier use in arduino ide.
3+
using firebase::modem::SerialTransceiver;
File renamed without changes.

src/modem/SerialTransceiver.h

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#ifndef MODEM_SERIAL_TRANSCIEVER_H
2+
#define MODEM_SERIAL_TRANSCIEVER_H
3+
4+
#include <memory>
5+
6+
#include "Firebase.h"
7+
#include "modem/commands.h"
8+
9+
namespace firebase {
10+
namespace modem {
11+
12+
class SerialTransceiver {
13+
public:
14+
void begin(Stream* serial);
15+
void loop();
16+
17+
private:
18+
std::unique_ptr<Command> CreateCommand(const String& name, Firebase* fbase);
19+
20+
std::unique_ptr<Firebase> fbase_;
21+
std::unique_ptr<ArduinoInputStream> in_;
22+
std::unique_ptr<ArduinoOutputStream> out_;
23+
};
24+
25+
} // modem
26+
} // firebase
27+
28+
#endif // MODEM_SERIAL_TRANSCIEVER_H

0 commit comments

Comments
 (0)