Copy down last edit

This commit is contained in:
Dr. Rubisco 2021-07-27 13:02:31 -04:00 committed by GitHub
parent d21a61aefd
commit 666b89c4c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -636,24 +636,24 @@ private:
// Parse mode and bandwidth // Parse mode and bandwidth
int mode; int mode;
switch(parts[1]) { if(parts[1] == "FM"){
case "FM" : mode = RADIO_IFACE_MODE_NFM; mode = RADIO_IFACE_MODE_NFM;
break; }else if(parts[1] == "WFM"){
case "WFM" : mode = RADIO_IFACE_MODE_WFM; mode = RADIO_IFACE_MODE_WFM;
break; }else if(parts[1] == "AM"){
case "AM" : mode = RADIO_IFACE_MODE_AM; mode = RADIO_IFACE_MODE_AM;
break; }else if(parts[1] == "DSB"){
case "DSB" : mode = RADIO_IFACE_MODE_DSB; mode = RADIO_IFACE_MODE_DSB;
break; }else if(parts[1] == "USB"){
case "USB" : mode = RADIO_IFACE_MODE_USB; mode = RADIO_IFACE_MODE_USB;
break; }else if(parts[1] == "CW"){
case "CW" : mode = RADIO_IFACE_MODE_CW; mode = RADIO_IFACE_MODE_CW;
break; }else if(parts[1] == "LSB"){
case "LSB" : mode = RADIO_IFACE_MODE_LSB; mode = RADIO_IFACE_MODE_LSB;
break; }else if(parts[1] == "RAW"){
case "RAW" : mode = RADIO_IFACE_MODE_RAW; mode = RADIO_IFACE_MODE_RAW;
break; }else{
default: // If mode is not supported, return error // If mode is not supported, return error
spdlog::error("Rigctl client sent invalid command: '{0}'", cmd); spdlog::error("Rigctl client sent invalid command: '{0}'", cmd);
resp = "RPRT 1\n"; resp = "RPRT 1\n";
client->write(resp.size(), (uint8_t*)resp.c_str()); client->write(resp.size(), (uint8_t*)resp.c_str());