Guard against too low TX delays.#63
Conversation
They can cause initial symbols to be dropped in turbo mode.
| do_post_ptt (false); | ||
| QThread::msleep (100); // some rigs cannot process CAT | ||
| QThread::msleep (PTT_DELAY_MS); // some rigs cannot process CAT | ||
| // commands while switching from |
There was a problem hiding this comment.
Actually, this already explained here in the code with a comment. Why are we adding code bloat for this? I specifically object to that. Code bloat is a common problem with open source projects "just because you can". But that doesn't make it right. As an example, on another project I work on where code runs on STM32 microcontroller chips, enough developers kept doing this type of stuff, and then it ends up having to be trimmed out because the binary wouldn't fit on the STM32 memory anymore.
Bingo! It's just a minimum allowable setting in the UI code. It fixes the original issue without any fanfare, without any bloat, the issue created by a misconfigured setting in the first place. The fix I applied prevents you from setting that Tx delay wrongly, which was the real issue. Now, if you want to edit the js8call.ini file and push the limits, good luck with all that. You are now in unsupported territory, attempting to create your own issues. You can break more than the Tx delay by editing that file. That PR was actually merged here 02781de, and then I reversed it to remove the bloat for a simple fix when you finally admitted you set the Tx delay to zero. Which anybody who understands how transmitter relays work would never do in the first place. So this just blows my mind that you insist on adding in code bloat again for something that is not needed. The tooltip popup would be the obvious place to explain the min setting and no users are going to question that. |
| return true; | ||
| } | ||
|
|
||
| void Configuration::impl::check_tx_delay() { |
There was a problem hiding this comment.
This function is totally unnecessary. The UI will not allow a setting below 100ms or above 500ms. Why is it here?
There was a problem hiding this comment.
"Why is it here?" is the fair part of the question.
This "totally unnecessary" function serves three different audiences, and I hope it serves them well:
- People who used prior versions of JS8Call or JS8Call-improved that did allow smaller values.
- People who dare to use an editor to configure stuff in the init file.
- Whatever developers come after us and may not know about the connection of a number in the UI file and a number somewhere in the depths of
TransceiverBase.cpp. This code ties those two together.
There was a problem hiding this comment.
the issue created by a misconfigured setting in the first place.
I happen to know that there is a silence at the beginning of each JS8-transmission of at least 100 ms anyway, depending on mode. I have reason to suspect my TX switches within a couple of millisecond or so. The UI offers me to tell it "no, I don't need any additional tx delay". How should I know that it is a misconfiguration to take that offer?
So then this appears. What we're doing here is calling a function to check the setting range of the Tx delay on the outside chance that somebody might edit js8call.ini.
On the not-so-outside chance that someone may have been using previous versions of JS8Call or JS8Call-improved and followed its invitation to configure values that lead to this undesired behavior.
I want to make sure this is corrected on first run, and I want to make sure the user is informed about the correction.
It is always a touchy thing for a software to disobey something a user has demanded. If that need arises, as is the case here, the software should at least be transparent about its disobedience.
There was a problem hiding this comment.
On the not-so-outside chance that someone may have been using previous versions of JS8Call or JS8Call-improved and followed its invitation to configure values that lead to this undesired behavior.
The counterpoint to this is that if somebody is moving from an older version to the newer version they expect to not have to re-configure their settings. If what they had was working, you are now forcing a change that they didn't ask for. People that have spent time setting up their system, and it works, do not like that. As a programmer you have no right to force this new setting on them. As it is now, if their js8call.ini has 0ms set for Tx delay, the UI limit change won't change that unless they try to change it again. At which point the tool tip should pop up and explain the new changes.
Microsoft is famous for overriding people's settings, why are we doing it here?
|
I hope this doesn't open up an ugly can of worms... I wonder if some pre-tone might be helpful for those who use VOX? This could be a function that is enabled/disabled completely in settings, and the length of pre-tone can be set (within reasonable limits, like limiting the delay to between 0.1 and 0.5 seconds). I personally have no use for this, and am not specifically aware of a problem related to this, but find that Fldigi has such a function, so it must be helpful to some operators.
If this is an unnecessary or bad idea, just ignore my comments and let's move on. Just thinking "out loud" here... Maybe there is not a real problem that requires a pre-tone solution for VOX users? 73, |
|
This PR issue actually has nothing to do with VOX. It has to do with the fact that the Tx delay in the UI was either deliberately or inadvertently misconfigured to have 0ms Tx delay. And then an issue with clipping leading symbols was created from this. The fix is simple - I just changed the UI so Tx delay can't be set below 100ms. The original "fix" coded in a built-in delay that was not presented to the UI end user. So then this appears. What we're doing here is calling a function to check the setting range of the Tx delay on the outside chance that somebody might edit js8call.ini. More code bloat for something I have never heard of anybody doing, especially since the UI limits the min to 0.1s and max to 0.5s after I fixed it. So where does it end? I can't approve that. If somebody else wants to, then fine. But I don't think it's good coding practice. What about my setup where I got a Beverage for Rx on 630m and I use the 127 for Tx? The antennas are switched with a downstream relay. If I set my Tx delay to 0.1s it won't work. Requires minimum 0.3s for relays to settle. The thing is, ham radio operators are supposed to know this. And if they don't they learn it. The VOX is a separate issue. It doesn't work with my FlexRadio because of too much latency. I know it does work for some, because I have a friend that uses it with a Xiegu G90. A keying tone that obeys the same UI Tx delay setting as CAT PTT would be ideal. But I'm not going get a chance to work on that any time soon as I got a bunch of administrative stuff going right now to get JS8Call-improved ready for the next release. |
Do you think that this is something which would be good to put on the Issues list of things to look at later (obviously, low priority)? If not, then just let it drop. 73, |
|
I actually posted it on the issues list here: #56 I believe there is a very small subset of people using VOX, mostly with small QRP radios. Just during my testing with this PR issue I found it doesn't work with my FlexRadio - couldn't get a single decodable frame out of it. It does work with my IC-7300, but there is considerable clipping of leading symbols that the FEC mostly takes care of. So there is three choices
|
|
@aknrdureegaesr I really don't want to leave this PR laying here. I would say either merge it if you're comfortable with what it does. Or ask for further review. In the case of further review here is my objections:
So that is my review of this. Either merge if you're comfortable with what you're doing, or ask for further review if you're not comfortable with over-riding what users want to do with their software. Either way, please don't let it just sit here. I have to admit I was not happy when this one popped up. I looked at it and I go "what the hell is this???" There's no way I can approve this. But I am not the ultimate authority on what gets merged into the code. |
|
Further suggestion; on the outside chance you might decide it could be a good idea to start a working "Help" menu to document some of these things, for pete's sake DON'T put it in mainwindow. mainwindow already has issues the way it is, we don't need more code in it. |
|
I agree with @Chris-AC9KH Chris' comments, and think the simple fix is sufficient, and recommend that this be closed. 73, |
|
I have another concern that I should try to explain to you people. From decades of coding as a professional, I have learned that good software isn't just software that works as intended. That, too. But it is also important that it is maintainable. Helpful for maintainability:
To get that, this is frequently helpful:
Our code as it stands now, it is not very high on the maintainability scale. I think everybody complains about the moloch But that line in I feel an urge to change that. I feel an urge to leave a trail leading from the obvious places that concern themselves with tx delay to |
|
I have another idea with less "code bloat". Please stand by. |
|
Any update @aknrdureegaesr ? |
|
I want to see at least the source code formatting stuff proposed in #49 finished first. |
|
Already been done when I moved the loose files out of the root of the source tree. I did it manually with Xcode. |
|
Let's discuss that over at #141 please. |
|
I've marked this as stale for now, as the code here will need a rewrite after the big refactor. I would suggest that @aknrdureegaesr close this and submit a new PR. |
|
Have to first decide if it's even valid. Analysis with an oscilloscope revealed that even VOX works without clipping any leading symbols. |
|
I'm going to close this PR. It's not only seriously out of date, we have new encoder/decoder fixes since the JS8 40 and JS8 60 modes were added. With JS8 60 it would be desirable to remove the 0.1s minimum Tx delay and let the software "figure it out". So this PR no longer applies. |
JS8Call-improved#3 waterfall right-panel Control/Display/Timing tabs CN visible (User verified). - 69 EN sources → CN: 控制/显示/时序 三 tab + 子控件 (label/tooltip/spinbox 后缀) - QSY 保英文 (§4 缩写锁); NORMAL/SLOW 保英文 (tooltip 内 JS8 mode names) - TX cycle → 发射 (JS8Call-improved#63-66); Timing → 时序 (JS8Call-improved#52) - Offset → 频偏 (JS8Call-improved#3, 与 JS8Call-improved#5 Offset:→频偏: 对偶, 覆盖 lupdate same-text body-fill stub 偏移) - lupdate fresh: Found 851 source text(s) (0 new), FALSIFIER① 排除 Known limitations: - EN switch 需 restart (PARK-092 sub-window changeEvent override 共缺, 接受) - Directed-to 切换"闪现-回 EN" → PARK-095 (动态 menu lifecycle, 另开 sub-phase) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
To continue the title: They can cause initial symbols to be dropped in turbo mode.
We had a premature push to our main branch. I object to the pull request solution that was merged, on the following grounds: