| 644 | } |
| 645 | |
| 646 | int rig_fire_mode_event(RIG *rig, vfo_t vfo, rmode_t mode, pbwidth_t width) |
| 647 | { |
| 648 | ENTERFUNC; |
| 649 | |
| 650 | rig_debug(RIG_DEBUG_TRACE, "Event: mode changed to %s, width %liHz on %s\n", |
| 651 | rig_strrmode(mode), width, rig_strvfo(vfo)); |
| 652 | |
| 653 | rig_set_cache_mode(rig, vfo, mode, width); |
| 654 | |
| 655 | // This doesn't work well for Icom rigs -- no way to tell which VFO we're on |
| 656 | // Should work for most other rigs using AI1; mode |
| 657 | if (RIG_BACKEND_NUM(rig->caps->rig_model) != RIG_ICOM) |
| 658 | { |
| 659 | STATE(rig)->use_cached_mode = 1; |
| 660 | } |
| 661 | |
| 662 | network_publish_rig_transceive_data(rig); |
| 663 | |
| 664 | if (rig->callbacks.mode_event) |
| 665 | { |
| 666 | rig->callbacks.mode_event(rig, vfo, mode, width, rig->callbacks.mode_arg); |
| 667 | } |
| 668 | |
| 669 | RETURNFUNC(0); |
| 670 | } |
| 671 | |
| 672 | |
| 673 | int rig_fire_vfo_event(RIG *rig, vfo_t vfo) |
no test coverage detected