Sorry for the double post but I think this is worth it.
Here's my first contribution, IMHO an improvement to the autorange algorithm.
The old one went like (in mW): 50, 100, 200, 300, ..., 900, 1000, 1500, 2000 and continued in increments of 500.
Mine goes: 1, 2, 3, ..., 9, 10, 20, 30, ..., 90, 100, 200, 300, ..., 900, 1000, 2000, 3000, ..., 9000, 10000, 20000 and so on.
It has a higher dynamic range and IMHO adapts better to very small and very big measurements. I placed a lower limit of 1mW because all Peregrine readings show with only one decimal.
I also thought abut using an osciloscope-like scale: 1, 2, 5, 10, 20, 50, 100, 200, 500, 1000, 2000, 5000, 10000, 20000 and so on. What do you guys think?
Heres the code, just substitute lines 69 to 74 of Graph.pde with:
Code:
if(maxData <= 1)
{
maximum = 1.0;
}
else
{
float magnitude = pow(10, floor(log(maxData) / 2.3025850929940456840179914546844));
maximum = ceil(maxData / magnitude) * magnitude;
}
Feel free to include this in the next version if you like it, Trevor!
Here are some suggestions:
-Unify Monitor and "regular" measurements - this could be done by adding a few more measurement settings:
--When available time is reached (combo box):
---stop (like "regular" measurements)
---roll window (like monitor does)
---increase total time (let's say it was set at 60s and you get one reading per second - after the graph border is hit every second extends the total time by one second and resizes it) (this would be very nice for long measurements without a foreseable end)
--Separate total time and time scale. Then you could make the graph show 5min or 300s, depending on your preferences.
--Add filtering options, to help remove noise:
---Amount of samples
---Supersampling/moving average selector
-Add restart button: stops the measurement, clears the graph and starts a new one with the same settings.
-Move stop from the menu to a button.
-Replace Measurement/New... with Measurement/Settings... or something. That way it won't restart until you click the restart button.
-Move port selection under the meter menu, refreshing automatically when the meter menu is opened. Leave only connect as a button.
-Move status bar to the bottom and buttons either to the top below the menus or to the bottom above the status bar.
-Make menus behave as standard menus:
--Remove "gaps"
--Top level menus only opens when clicked
--Only one menu is open at a time
--Menus only close when you click outside
-Add software zeroing:
--A zero button, when clicked it takes a few readings, computes average (or maybe minimum) and from that point forward subtracts that from all readings.
--A raw button, which removes the software zeroing.
--A fourth panel beside Current Reading/Peak/Average, which shows the current Zero. This is needed to avoid people faking readings.
--Maybe a settings menu, with the amount of readings to use for zeroing and a selector for average or minimum.
Please don't take this huge list of suggestions wrong, Peregrine is absolutely wonderful as it is! I just think the interface could be more "standard" and intuitive with some changes.
I might try to implement some of these but I don't know anything about Processing and may not be able to do much, interface wise.