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

Commit 7c2c60c

Browse files
committed
Fixed some issues from PR review
Modem design image modified diagram renamed diagram Create design.md Update design.md Updated diagram Update design.md switched diagram back to png Update design.md Update design.md Untested initial command with tests Added gmock/gtest submodules Revert "Added gmock/gtest submodules" This reverts commit b975f3b. found out googlemock and googletest are now merged, only need one. Added googletest submodule import example make file Added *Ptr methods to firebase, get test mostly compiling Broke FirebaseHttpClient out from Firebase to allow greater portability and testability. re check in commands and add input stream Working local command test Added base test for set Added base test for set (actually this time) Cleanup set test and add error test Clean up get test and added failure handling Added remove command and test Added push command and test Minor cleanup to set test Added begin command and test Fixed all tests operating on the assumption that readLine() included the \r\n Add base for SerialTransciever. Getting serial example together Cleaning up Changes to make both arduino and tests compile All existing examples work now. changes to get SerialHost building Fixed up Stream example Fixes to get FirebaseSerialHost.ino working! Switch to huzzah module. All examples are working unit tests are all working with new changes Added stream command using simple syntax. Fixes from testing with serial modem Reorganized the library to comply with arduino 1.5+ library standards https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5:-Library-specification Fixed some issues from PR review Modem design image modified diagram renamed diagram Create design.md Update design.md Updated diagram Update design.md switched diagram back to png Update design.md Update design.md Untested initial command with tests Added gmock/gtest submodules Revert "Added gmock/gtest submodules" This reverts commit b975f3b. found out googlemock and googletest are now merged, only need one. Added googletest submodule import example make file Added *Ptr methods to firebase, get test mostly compiling Broke FirebaseHttpClient out from Firebase to allow greater portability and testability. re check in commands and add input stream Working local command test Added base test for set Added base test for set (actually this time) Cleanup set test and add error test Clean up get test and added failure handling Added remove command and test Added push command and test Minor cleanup to set test Added begin command and test Fixed all tests operating on the assumption that readLine() included the \r\n Add base for SerialTransciever. Getting serial example together Cleaning up Changes to make both arduino and tests compile All existing examples work now. changes to get SerialHost building Fixed up Stream example Fixed up Stream example Fixes to get FirebaseSerialHost.ino working! Switch to huzzah module. All examples are working unit tests are all working with new changes Add modified submodule Added stream command using simple syntax. Fixes from testing with serial modem Reorganized the library to comply with arduino 1.5+ library standards https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5:-Library-specification Fixed some issues from PR review re check in commands and add input stream Working local command test Update design.md Update design.md Added base test for set Added base test for set (actually this time) Cleanup set test and add error test Added remove command and test Added push command and test Minor cleanup to set test Added begin command and test Fixed all tests operating on the assumption that readLine() included the \r\n Add base for SerialTransciever. Getting serial example together Cleaning up Changes to make both arduino and tests compile All existing examples work now. changes to get SerialHost building Fixed up Stream example Fixed up Stream example Fixes to get FirebaseSerialHost.ino working! Switch to huzzah module. All examples are working unit tests are all working with new changes Add modified submodule Added stream command using simple syntax. Fixes from testing with serial modem Reorganized the library to comply with arduino 1.5+ library standards https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5:-Library-specification Fixed some issues from PR review
1 parent ca715c8 commit 7c2c60c

File tree

5 files changed

+38
-31
lines changed

5 files changed

+38
-31
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/Firebase.h

+5-1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ class Firebase {
4040

4141
Firebase(const Firebase&) = delete;
4242

43+
Firebase(const Firebase&) = delete;
44+
45+
Firebase(const Firebase&) = delete;
46+
4347
// Fetch auth string back.
4448
const String& auth();
4549

@@ -191,6 +195,6 @@ class FirebaseStream : public FirebaseCall {
191195

192196
private:
193197
FirebaseError _error;
194-
};
198+
};
195199

196200
#endif // firebase_h

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)