mirror of
https://github.com/usatiuk/EggbotWireless.git
synced 2025-10-26 16:57:48 +01:00
why did i even think of THAT?
This commit is contained in:
@@ -10,8 +10,6 @@
|
||||
class Executor
|
||||
{
|
||||
private:
|
||||
unsigned long lastStsTime;
|
||||
Status lastSts;
|
||||
public:
|
||||
Executor(/* args */);
|
||||
void execCommand(Command command);
|
||||
|
||||
@@ -24,12 +24,6 @@ void Executor::execCommand(Command command) {
|
||||
}
|
||||
|
||||
Status Executor::status() {
|
||||
unsigned long reqTime = millis();
|
||||
|
||||
if (reqTime - lastStsTime < lastStsTTL) {
|
||||
return lastSts;
|
||||
}
|
||||
|
||||
Status status;
|
||||
unsigned int curByte;
|
||||
byte rxBuffer[i2cStsBytes];
|
||||
@@ -45,8 +39,5 @@ Status Executor::status() {
|
||||
}
|
||||
}
|
||||
|
||||
lastStsTime = millis();
|
||||
lastSts = status;
|
||||
|
||||
return status;
|
||||
}
|
||||
@@ -38,6 +38,7 @@ void QueueManager::loopRoutine() {
|
||||
|
||||
void QueueManager::putCommand(std::string cmd) {
|
||||
if (!std::isalnum(cmd[0])) {
|
||||
Serial.println("OK");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user