To get the auto set functionality working I did some tests that were not so successful
![Sad :(](https://www.eevblog.com/forum/Smileys/default/sad.gif)
I decided it is time to clean up the code first and then write a more proper auto set function, and also tackle the zero offset calibration.
Leading up to this cleanup I tried one other thing with the new found knowledge of the system. I discovered that the FPGA command 0x0D is for setting the sample rate and allows for lower rates then the 2KSa/s found earlier, so for the 100ms/div and 200ms/div settings I tested with 1000Sa/s and 500Sa/s, and these work. This makes it a bit easier to get a first release of the new firmware done.
Added the two sample rate settings to the menu.
For the sample rates 5KSa/s - 500Sa/s I believe the trigger system is not functioning, because it is not keeping the signal in its place, so have to work on that too. In the original the top and right trigger pointers are not shown when 20ms/div or 50ms/div are selected.
Next couple of day's will go into the cleanup and re-write of the sample functions to allow for easier and better implementation of the calibration and auto set functionality.
The picture shows a 1Hz sine on channel 1 and a 2Hz sine on channel 2 at 1KSa/s and 100ms/div.