Skip to content

Commit

Permalink
Info for serialreader.plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
pbosetti committed Jun 17, 2024
1 parent 1929010 commit 8c7b3ac
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/plugin/serial_reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ class SerialReader : public Source<json> {
return_type get_output(json *out, std::vector<unsigned char> *blob = nullptr) override {
string line;
bool success = false;
if (setup() != return_type::success) {
return return_type::error;
if (setup() != return_type::critical) {
return return_type::critical;
}
do {
line.clear();
Expand All @@ -68,7 +68,10 @@ class SerialReader : public Source<json> {
}

map<string, string> info() override {
return {};
return {
{"port", _params["port"].get<string>()},
{"baudrate", to_string(_params["baudrate"].get<unsigned>())}
};
};

private:
Expand Down

0 comments on commit 8c7b3ac

Please sign in to comment.