Fallback capability detection when dependencies module unavailable.
(self, capabilities: dict)
| 633 | }) |
| 634 | |
| 635 | def _detect_capabilities_fallback(self, capabilities: dict): |
| 636 | """Fallback capability detection when dependencies module unavailable.""" |
| 637 | tool_checks = { |
| 638 | 'pager': ['rtl_fm', 'multimon-ng'], |
| 639 | 'sensor': ['rtl_433'], |
| 640 | 'adsb': ['dump1090'], |
| 641 | 'ais': ['AIS-catcher'], |
| 642 | 'acars': ['acarsdec'], |
| 643 | 'aprs': ['rtl_fm', 'direwolf'], |
| 644 | 'wifi': ['airmon-ng', 'airodump-ng'], |
| 645 | 'bluetooth': ['bluetoothctl'], |
| 646 | 'dsc': ['rtl_fm'], |
| 647 | 'rtlamr': ['rtlamr'], |
| 648 | 'satellite': [], |
| 649 | 'listening_post': ['rtl_fm'], |
| 650 | 'tscm': ['rtl_fm'], |
| 651 | } |
| 652 | |
| 653 | for mode, tools in tool_checks.items(): |
| 654 | if not config.modes_enabled.get(mode, True): |
| 655 | capabilities['modes'][mode] = False |
| 656 | continue |
| 657 | if not tools: |
| 658 | capabilities['modes'][mode] = True |
| 659 | continue |
| 660 | if mode == 'adsb': |
| 661 | capabilities['modes'][mode] = ( |
| 662 | self._check_tool('dump1090') or |
| 663 | self._check_tool('dump1090-fa') or |
| 664 | self._check_tool('readsb') |
| 665 | ) |
| 666 | else: |
| 667 | capabilities['modes'][mode] = all( |
| 668 | self._check_tool(tool) for tool in tools |
| 669 | ) |
| 670 | |
| 671 | def get_status(self) -> dict: |
| 672 | """Get overall agent status.""" |
no test coverage detected