Skip to content

Commit

Permalink
cleanup PoC
Browse files Browse the repository at this point in the history
  • Loading branch information
lorow committed Jun 10, 2024
1 parent 049b160 commit d744668
Showing 1 changed file with 3 additions and 19 deletions.
22 changes: 3 additions & 19 deletions ESP/lib/src/io/Serial/SerialManager.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
#include "SerialManager.hpp"

SerialManager::SerialManager(CommandManager* commandManager)
: commandManager(commandManager) {
this->queryManager = new QueryManager();
}
: commandManager(commandManager) {}

#ifdef ETVR_EYE_TRACKER_USB_API
void SerialManager::send_frame() {
Expand Down Expand Up @@ -54,26 +52,12 @@ void SerialManager::send_frame() {
#endif

void SerialManager::init() {
#ifndef SERIAL_MANAGER_USE_HIGHER_FREQUENCY
#ifndef SERIAL_MANAGER_USE_HIGHER_FREQUENCY
Serial.begin(3000000);
#endif
#endif
if (SERIAL_FLUSH_ENABLED) {
Serial.flush();
}

this->sendQuery(QueryAction::READY_TO_RECEIVE, QueryStatus::NONE, "");
}

void SerialManager::(QueryAction action,
QueryStatus status,
std::string additional_info) {
JsonDocument doc;
doc["action"] = queryActionMap.at(action);
doc["status"] = status;
doc["additional_info"] = additional_info;

doc.shrinkToFit(); // optional
serializeJson(doc, Serial);
}

void SerialManager::run() {
Expand Down

0 comments on commit d744668

Please sign in to comment.