Halscope always 16 channels, and add user configurable samples#3722
Halscope always 16 channels, and add user configurable samples#3722andypugh merged 4 commits intoLinuxCNC:masterfrom
Conversation
|
I think I pulled at the wrong time, I will try to fix it |
- Add GUI control for sample count in acquire dialog with config file persistence (SAMPLES command read before scope_rt loads) - Always enable all 16 channels - remove confusing record length radio buttons that forced tradeoff between channels and samples - Initialize sample_len and rec_len in init_horiz() so sampling works immediately without opening acquire dialog - Add bounds checking for num_samples (min 1000, max 1000000) - Increase default window size to 1050x550 for better channel display - Show restart message when sample count changed (requires reload)
|
Is retro compatibility important? 2.10 can open 2.9 settings, but 2.9 will not understand 2.10 settings |
|
I implemented full bidirectional compatibility, so whomever switches branches won't be bothered by the changes |
|
What happens if 2.9 halscope reads a 2.10 halscope file? If it still reads all "old" parameters except the new ones it would be no problem. But I haven't looked into it if it may fail to read the file at all? |
Previous commit 2.9 would just not open the new files, probably cause I had the new config in the header, but I think it makes more sense to have it in the header as a comment which 2.10 can parse, and 2.9 ignores, already pushed the commit to fix this... |
|
I am not sure that Halscope usefully opens files? |
It can open configuration files... |
|
On it |
|
Simple job for my stochastic parrot 🤭 |
|
Thanks for this. |
|
This seems in a few ways a step in the right direction for modern hardware, but it seems there are also a few issues...
halscope: command not implemented: '# SAMPLES 32000' I think (pretty sure) that is because in the function "read_config_file" in scope.c, there is no way to handle comments. So it tries incorrectly to execute the command # SAMPLES 32000, when that line should be ignored. |
Need restart linuxcnc to get bigger buffer. |
Wow, I feel a bit silly, but that was not apparent to me. I took the message at face value: "The new sample count (512000) will take effect the next time halscope is started." It seems it should be modified to say that linuxcnc needs to be restarted entirely. I do wonder why we need to restart though. It seems like it's memory allocation, but is there a problem with just setting the necessary memory to a max? In modern PCs this can only be a few Mb, right?
the contents of the file are just: I did make a quick modification to read_config_file to ignore lines with comments, and it made the aforementioned errors go away. It's trying to pass the commented line to parse_command() and it does not like it. |
|
I created this pull request that addresses the above: |
The default memory has been increased, and user can set custom memory and restart to get less or more.
During the work on the jerk control have been using the scope a lot, this makes it a better tool for debugging.