2013-08-03

First of all many thanks to Trevor for this wonderful piece of software!

I've been working on some modifications/additions to Peregrine and now I think I've got enough new stuff to be worth sharing my version with your guys. I talked with Trevor and he had the great idea of creating a new thread and letting people beta test my version for some time before merging it back on the official version.

Please post your feedback, even if it is to say it didn't run or you didn't like it. Let me know if you find any (unknown) bugs.

Here it is, at last: Peregrine 1.4!
Download it here. I'd appreciate if anyone could host this at a proper server (just post the link and I'll edit here).

Here's an exported graph showing some of the new features (software zeroing, selection box exporting and minimum power)


Here's a shot of the interface with the new buttons (sorry, no laser)


The changelog is quite long but IMHO very worth reading, else you might not notice some of the new features.

Changes from version 1.2.1.3 (made by Trevor) to version 1.4 (made by Atomic)

Changed version to 1.4

Changed autorange algorithm - now it goes: 1, 2, 3, ..., 9, 10, 20, 30, ..., 90, 100, 200, 300, ..., 900, 1000, 2000, 3000, ..., 9000, 10000, 20000 and so on.

Interface changes

Moved status bar to bottom

Moved buttons

Moved contents of the Measurement menu to buttons because they're used all the time

Moved measurements settings from New to a Settings button

Changed the New menu to a (Re)start button, that starts a new measuremnt with current settings and discards the old one

Stop button will stop current measurement without erasing, just like it did before

Added the last missing time label on the graph and resized to accomodate

Merged monitoring mode and regular measurements

New end action setting:

Stop: stops measuring when the graph border is reached

Roll Window: starts to roll the window when the graph border is reached, discarding old readings (this is the same as the old monitoring mode)

Increase Length: keeps getting new measurements and resizing the graph to fit, use this when you don't know how long you'll measure before starting (might slow down if you use it for a long time)

Added end action to configs

Threshold can be left negative or blank to disable - use this to start measuring as soon as you press (Re)start

Added default threshold to configs

Removed auto start when connecting because it didn't read new settings - use the (Re)start button

Cancelling the Settings dialog will now properly revert the changes made

Added background color setting

Made grid a lighter shade of grey (on both real time and exported graphs)

Allowed saving whenever graphing is stopped (allows empty graphs but that's fine to me)

Added software zeroing

Amount of samples to take before computing the zero can be set on configs (more samples will take longer but produce a better zero, adjust based on the datarate of your LPM)

Type of zero can be set on configs:

Minimum: use the smallest reading from the samples (will fluctuate slightly above zero, with rare negative readings)

Average (recommended): use the average of all the samples (will fluctuate around zero but both positive and negative readings might happen)

Maximum: use the highest reading from the samples (will fluctuate slightly below zero, with rare positive readings)

Added a panel that shows current zero

Added buttons to zero and unzero

Zero will be on exported graph if it's being used

Added minimum reading panel

Added minimum on exported graph

Improvements to exported graph

Added default export dir config, will default to user folder if commented out

Changed the code to make the graph mathematically accurate, considering the limitations of floating point math and rounding

Rescaled the time axis to include the borders and not just the inside

Made sure the graph line draws over everything else (border, grid and selection)

The selection box is now exported and the Peak/Average/Minimum readings will be taken from the selection

Added width and height configs (height was already there but didn't work) and made the exported graph resize accordingly (there are some limitations listed on the config file)

Added autoconnect config - just type the name of your COM port and it will connect as soon as you plug it in

Added software oversampling - this will collect a number of samples, compute the average and treat them as a single sample

Choose the amount of samples to average on the Settings dialog (more samples will decrease error/increase resolution but will lower the datarate) (use more samples to accurately read weak lasers) (can be left negative/zero/blank to disable)

Added to configs

Internal changes:

Used enums instead of constants when possible

Centralized config loading

Removed start_flag

Removed done state

Added some debug values and moved others to fit window

Moved/restyled a lot of code (but not all of it)

Added some helper methods: drawRectangle, toPanelFormat and toRoundedString

Added variables for background, grid and selection box colors that affect both the real time graph and the exported graph, to make easier to add configs for them eventually

As any biggish software this has some bugs. Here's the list of what I've found so far.

Known bugs

Real time graph has a few inaccuracies (use the exported graph when accuracy is needed)

A reading of 10% wont fall exactly on the first grid

The selection box is off by a few pixels

Grid size isn't consistent

Peregrine will slow down if you leave it collecting data on Increase Length mode (workaround: increase oversampling to store less readings)

Datarate seems slightly wrong when a lot of oversampling is used, needs further investigation but does not seem to affect accuracy

Show more