myDCFocuser
(c) Robert Brown 2019
All rights reserved.
brown_rb@yahoo.com
Source code for this release can be found on Github.
This compiled application was written in Visual Studio 2013, using C#
(c) Copyright Robert Brown 2014-2018. All Rights Reserved.
The schematic, code and ideas for myFocuser are released into the public domain.
Users are free to implement these but may NOT sell this project or projects based
on this project for commercial gain without express written permission granted
from the author. Schematics, Code, Firmware, Ideas, Applications, Layout are
protected by Copyright Law. Permission is NOT granted to any person to
redistribute, market, manufacture or sell for commercial gain the myDCFocuser
products, ideas, circuits, builds, variations and units described or discussed
herein or on this site.
Permission is granted for personal/academic/education use only.
// 1.1.1.8
// Add timer refresh rate buttons to temperature tab
// Save/restore temperature refresh rate with application
// 1.1.1.7
// Add temperature graph to temp tab
// add extra settings tab
// 1.1.1.6
// Change to tab layout
// 1.1.1.5
// Prevent clipping of controls in main window
// Correct scaling of form window
// 1.1.1.4
// Extend certificate
// 1.1.1.3
// fix logging of error messages upon exception [sometimes ignored]
// 1.1.1.2
// Fix bug in Celsius and Fahrenheight
// 1.1.1.1
// Add support for relative focusers
// 1.1.1.0 06072018
// Fix having to click HALT twice after a move
// 1.1.0.9 03072018
// Fix bug in connecting when there is no response (program hung)
// Discard serial in buffer on connect
// Set control lines when disconnecting from serial port
// 16022017 1.1.0.8
// Add Motorspeed to main GUI
// 02122017 1.1.0.7
// Change locale to eng-us for application
// 10072017 1.1.0.6
// Changes to Tempoffset to support different windows local settings (eg Europe)
// 18102016 1.1.0.5
// Remember form location
// 13102016 1.1.0.4
// Enable clear timer on StatusMsgBar
// 12102016 1.1.0.3
// Add timer to clear StatusMessageBar after set delay time - added on Settings form
// Validate all values on Settings form when loading and closing form
// 10102016 1.1.0.2
// Fix: Clearing the focuser position text box and clicking Set Position causes a crash
// Fix: Clearing the focuser position text box and clicking GOTO Position causes a crash
// Fix: Clearing MaxSteps text box and clicking Set MaxSteps causes a crash
// Redesign GUI and remove Rx/Tx boxes and replace with statusbar
// 02092016 1.1.0.1
// Disconnect if error in serial comms or serial comms is lost during session
// 29082016 1.1.0.0
// Fix for app staying resident in memory after closing (rare occurrence)
// Moved a few controls around - refresh now under comports
// Updated tab controls
// Change name of logfile to myDCFocuserProxxxxxx
// Rename Product Name to myDCFocuserPro
// 04062016 1.00.10.05
// Change Company/PublisherName to myFocuserPro and Product Name to myFocuserDCPro
// 29052016 1.00.10.04
// Adding jogging control, change of motor speeds, slow, medium and fast
// 31102016 1.00.10.02
// Win10 Compatible, no longer saves window location
// removed torque setting from properties - code was removed in an earlier version
// 04012016 1.00.10.01
// Added temperature handling to application, only use with firmware version 107 or greater
// 15122015 1.00.10.00
// Single instance check on startup, only one instance can run at a time
// Cleaned up errorlogging
// 11122015 1.00.09.08
// Saves window locations and sizes, hold down shift to override
// Arduino firmware version also displayed in About box when connected
// Disable resizing of windows form and sub-forms
// Fixed errors if trying to display sub-forms more than once
// 30112015 1.00.09.05
// changed serial initialization code, will connect if external power is ON first
// write Arduino firmwware version to logfile on connect()
// fixed when connecting to invalid comport
// 31082015 1.00.09.02
// When connected, connect button disabled, disconnect enabled etc
// When disconnected, connect button enabled, disconnect disabled etc
// Use published application version rather than static version string
// 28082015 1.00.09.01
// Ensure icons are on top left of every form
// 28082015 1.00.09.00
// Fix bugs in closingform() - left out a bit of important code by mistake
// 28082015 1.00.08.09
// Rewrite the exit events, now will not let application exit if serial port is connected
// changes to GetTempPath()
// made a dialog box that will set directory of logfile rather than use TEMP environment variable
// path is remembered
// changes to LogMessageToFile()
// changes to way application closes to ensure all memory is cleaned up and resources released
// removed form.closed event
// 10072015 1.00.08.08
// fixed bug in maxsteps forecolor on disconnect/connect
// 09072015 1.00.08.07
// added link to sourceforge site on settings menu
// On disconnect, dim values in Focuser Position, Maximum Position, Temp Offset
// on connect, reset color of text in Focuser Position, Maximum Position, Temp Offset
// added logfile capability
// added focuser presets form
// added default settings form, delay on connect, delay on read
// 05072015 1.00.08.02
// added tool tips to buttons in main window
// used new certificate that expires in 2020 (MakeCert)
// 01022015 v1.00.08.00
// added validation to numeric input on Focuser Position and MaxSteps text entry boxes
//
// 31012015 v1.00.07.00
// Removed myversion string and now doing this version from the piublic version number
// NOTE: About() does NOT work when running in Visual Studio, only when program is installed
//
// 29012015 v1.0.6
// added remember comport
//
// 26012015 v1.0.5
// added comport refresh
//
// 26122014 v1.0.3
// updated the pulseduration and pulsedelay min/max parameters based on breadboard test
//
// 23122014 v1.0.2
// have controller send :PO01# on connect() to disable reading of pot values
// added :PG# to display controller values in RX textbox (click on Tx label)
//
// 22122014 v1.0.1
// added Pulse Length/Pulse Duration/Torque Setting track bars
//
// 17122014
// initial write
//