mirror of
https://github.com/AlexandreRouma/SDRPlusPlus.git
synced 2024-11-06 18:57:39 +01:00
Add support for compound commands
This commit is contained in:
parent
e27702c166
commit
4092874f5c
@ -416,7 +416,8 @@ private:
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (parts[0] == "F") {
|
||||
for(int i = 0; i < parts[0].length(); i++){
|
||||
if (parts[0].at(i) == 'F') {
|
||||
std::lock_guard lck(vfoMtx);
|
||||
|
||||
// if number of arguments isn't correct, return error
|
||||
@ -439,7 +440,7 @@ private:
|
||||
resp = "RPRT 0\n";
|
||||
client->write(resp.size(), (uint8_t*)resp.c_str());
|
||||
}
|
||||
else if (parts[0] == "f") {
|
||||
else if (parts[0].at(i) == 'f') {
|
||||
std::lock_guard lck(vfoMtx);
|
||||
|
||||
// Get center frequency of the SDR
|
||||
@ -455,7 +456,7 @@ private:
|
||||
sprintf(buf, "%" PRIu64 "\n", (uint64_t)freq);
|
||||
client->write(strlen(buf), (uint8_t*)buf);
|
||||
}
|
||||
else if (parts[0] == "q") {
|
||||
else if (parts[0].at(i) == 'q') {
|
||||
// Will close automatically
|
||||
}
|
||||
else {
|
||||
@ -466,6 +467,7 @@ private:
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
std::string name;
|
||||
bool enabled = true;
|
||||
|
Loading…
Reference in New Issue
Block a user