current scan command works incorrectly. It just duplicates sweep command functionality and don't returns data immediately. This is just a copy of sweep command. This is incorrect behavior.
The expected behavior of scan command is to get unlimited measurement point count. For example it should measure 1'000 points or 100'000 points. It should not store all points in the memory, because it will leads to out of memory error. So, it should return data immediately with no need for data command.
Another issue with current scan command is that it doesn't allow to select expected frequency step, because current implementation expects stop frequency instead of step frequency.
The expected scan command parameters is the following:
scan {start(Hz)} {step(Hz)} {count}
Note, it should use {step(Hz)} instead of {stop(Hz)}. Step may be negative, in such case scan command should perform sweep from higher frequency to lower frequency. The firmware should not calculate step, it should be provided in the command parameter.
scan command should NOT store all points in the memory, instead of that it should print measured data into console for each frequency step immediately.
I understand what you say.
But there is a principal or an architecture of software to archive functions in such small devices.
The current scan command is as in my intention, and its function is not duplicate.
current scan command works incorrectly. It just duplicates sweep command functionality and don't returns data immediately. This is just a copy of sweep command. This is incorrect behavior.
The expected behavior of scan command is to get unlimited measurement point count. For example it should measure 1'000 points or 100'000 points. It should not store all points in the memory, because it will leads to out of memory error. So, it should return data immediately with no need for data command.
Another issue with current scan command is that it doesn't allow to select expected frequency step, because current implementation expects stop frequency instead of step frequency.
The expected scan command parameters is the following:
scan {start(Hz)} {step(Hz)} {count}
Note, it should use {step(Hz)} instead of {stop(Hz)}. Step may be negative, in such case scan command should perform sweep from higher frequency to lower frequency. The firmware should not calculate step, it should be provided in the command parameter.
scan command should NOT store all points in the memory, instead of that it should print measured data into console for each frequency step immediately.