Changes to make cat control a bit more stable#15
Conversation
Pass radio model to icom class to enable model-specific behavior. Improve PTT status handling by skipping PTT checks for IC-910 radios, which do not support PTT status queries via CAT commands. Refactor doppler update logic to handle IC-910 and other radios appropriately.
Replaces deprecated 'inWaiting()' and 'flushInput()' methods with 'in_waiting' and 'reset_input_buffer()' to ensure compatibility with newer versions of pyserial.
Adds robust serial timeout and error handling to ICOM radio communication, including retries for setup commands and validation for frequency updates. Introduces doppler tracking worker restart logic after reconnection in QTrigdoppler, and improves logging and cleanup procedures for better reliability during communication failures.
Wrapped doppler calculation functions in try/except blocks to handle exceptions and cases where ephemdata.range_velocity is None. Added logging for warnings and errors to improve robustness and traceability, ensuring functions return fallback values when satellite data is unavailable or computation fails.
Introduces periodic and pre-update health checks for the ICOM radio in QTrigdoppler.py to improve robustness during satellite tracking. Adds check_radio_health and periodic_health_check methods to lib/icom.py, ensuring the radio is responsive before attempting frequency updates or after reconnection attempts. This helps prevent unresponsive radio issues from disrupting tracking operations.
Increase health check interval and add consecutive failure handling for radio tracking. Implement adaptive frequency update thresholds and intervals to prevent overwhelming the radio, especially for IC-910. Reduce frequency of audio level logging in both monitoring and recording, and add config option to control audio level logging in pass recorder. Minor improvements to radio health check timing.
Reduced minimum frequency update interval and refined adaptive thresholds and sleep durations for doppler rate handling, specifically optimized for high latitude scenarios (e.g., 57.63°N). These changes improve tracking responsiveness and radio safety during extreme doppler conditions.
Eliminated periodic and per-update radio health checks from QTrigdoppler.py and removed related methods from lib/icom.py to streamline frequency update logic. Updated help documentation to clarify expected minor frequency adjustments around TCA and normal CI-V command failures during transmission.
There was a problem hiding this comment.
Pull Request Overview
This pull request improves the stability and robustness of ICOM radio control, particularly for the IC-910 model, through enhanced error handling, adaptive doppler tracking, and improved serial communication. The changes focus on making the cat control more stable by addressing timing issues, connection failures, and model-specific behaviors.
- Added radio model awareness with IC-910-specific handling that skips unsupported PTT checks and implements adaptive frequency updates
- Implemented comprehensive error handling and validation throughout satellite calculations and ICOM communication
- Enhanced logging and debugging capabilities with configurable audio level logging and reduced frequency for performance
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| lib/sat_utils.py | Added comprehensive error handling and null checks to all doppler calculation functions |
| lib/pass_recorder.py | Made audio level logging configurable and reduced logging frequency from every second to every 10 seconds |
| lib/icom.py | Enhanced serial communication with timeouts, retry logic, frequency validation, and IC-910-specific PTT handling |
| help/radio-configuration.md | Added documentation explaining normal CI-V command failures during transmission on IC-910 |
| help/getting-started.md | Added guidance for normal frequency adjustments needed around TCA |
| help/frequency-control.md | Added detailed explanation of TCA calibration adjustment requirements |
| QTrigdoppler.py | Implemented adaptive doppler tracking with IC-910-specific logic, improved reconnection handling, and enhanced error recovery |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Corrects the message length check for validMsg from 5 to 6 bytes and removes duplicate FM mode handling in the setMode function.
Changed Peter's callsign from 2M0SQL to MM9SQL in the contributor list and modification notes for accuracy.
Added details about remote server integration, enhanced rotator control, comprehensive web API, advanced audio monitoring, extensive configuration management, and improved logging system to the README.
|
Looks good despite one thing: I don't see the need for it. It'll brick packet mode. The 910 supports PTT readout |
This pull request introduces significant improvements to ICOM radio support, especially for the IC-910, and enhances doppler tracking robustness and efficiency in
QTrigdoppler.py. It adds adaptive frequency update logic, improves error handling and reconnection flows, and includes clarifications in the documentation for common user issues. Below are the most important changes:ICOM Radio Handling and Robustness:
radio_modelparameter to theicomclass and its initialization, allowing model-specific handling (notably for the IC-910) and improved serial connection error logging and timeouts (lib/icom.py,QTrigdoppler.py). [1] [2] [3]icom, including specific exceptions for connection and read errors, and more robust frame parsing (lib/icom.py).QTrigdoppler.py). [1] [2]Doppler Tracking and Frequency Update Optimization:
QTrigdoppler.py).QTrigdoppler.py). [1] [2]Error Handling and Logging:
lib/icom.py,QTrigdoppler.py). [1] [2]QTrigdoppler.py).Documentation Updates:
help/getting-started.md,help/frequency-control.md,help/radio-configuration.md). [1] [2] [3]These changes collectively improve the reliability, user experience, and maintainability of the doppler tracking system, especially for users with the IC-910 radio.