| 1236 | |
| 1237 | #ifdef USE_HAMLIB |
| 1238 | void AppFrame::enableRig() { |
| 1239 | wxGetApp().stopRig(); |
| 1240 | wxGetApp().initRig(rigModel, rigPort, rigSerialRate); |
| 1241 | |
| 1242 | if (devInfo != nullptr) { |
| 1243 | std::string deviceId = devInfo->getDeviceId(); |
| 1244 | DeviceConfig *devConfig = wxGetApp().getConfig()->getDevice(deviceId); |
| 1245 | rigSDRIF = devConfig->getRigIF(rigModel); |
| 1246 | if (rigSDRIF) { |
| 1247 | wxGetApp().lockFrequency(rigSDRIF); |
| 1248 | } else { |
| 1249 | wxGetApp().unlockFrequency(); |
| 1250 | } |
| 1251 | } else { |
| 1252 | wxGetApp().unlockFrequency(); |
| 1253 | } |
| 1254 | |
| 1255 | wxGetApp().getConfig()->setRigEnabled(true); |
| 1256 | } |
| 1257 | |
| 1258 | void AppFrame::disableRig() { |
| 1259 | wxGetApp().stopRig(); |
nothing calls this directly
no test coverage detected