#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Benthic Imaging AUV Camera Payload Software Release Notes
#
# Copright 2008, Monterey Bay Aquarium Research Institute.
# Licensed for oceanographic instrumentation demonstration field-of-use.
#
# Intellectual Property Disclaimer
#
# MBARI MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED.  BY WAY OF 
# EXAMPLE, BUT NOT LIMITATION, MBARI MAKES NO REPRESENTATIONS OR WARRANTIES OF 
# MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE 
# LICENSED SOFTWARE COMPONENTS OR DOCUMENTATION WILL NOT INFRINGE ANY PATENTS, 
# COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.  MBARI SHALL NOT BE HELD LIABLE FOR 
# ANY LIABILITY NOR FOR ANY DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH 
# RESPECT TO ANY CLAIM BY RECIPIENT OR ANY THIRD PARTY ON ACCOUNT OF OR 
# ARISING FROM THIS AGREEMENT OR USE OF THE SOFTWARE OR SPECIFICATION.
#
# maintained by:  k. headley, r. mcewen
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This file contains release notes for specific versions of the benthic imaging AUV camera payload software.

Release Info:
$Name$
$Id$

# apr05_2012 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Added software configuration support (XPort.h) for Lantronix MatchPort.
The MatchPort version uses the same protocol to control GPIO, but has more GPIO pins and 
updated firmware (CoBos) compared with XPort.

The main changes were 
- Create general (hardware-independent) names (CFG_*) for the Lantronix #defines, 
  which are used in the source files to specify hardware constants
- Assigned  general definitions using device-specific constants (XP_* and MP_*) in XPort.h
- Added compile-time flags to select the device (see below). 
- camera driver (QNX) and test code has been updated to reflect these changes

The changes have been merged with previous code changes related to matchport (e.g. changing camera enable to camera disable etc.). 
Also made some changes to the Makefile, so that it continues to work on windows/mac/linux test platforms. 
The use of System.millisleep() was conditionally compiled on QNX;  C sleep() (time.h) is used on other platforms. 

IAUV uses different (and additional) GPIO pin assignments when using MatchPort instead of XPort.
Software build configuration is controlled in the Makefile (HW_CFG_FLAGS) and XPort.h. 
Builds XPort by default; set HW_CFG_FLAGS=-DLANTRONIX_XPORT or -DLANTRONIX_MATCHPORT.
GPIO masks, configuration and pin assigments may be changed in XPort.h

The CameraDriver may not build for XPort, since it refers to GPIO that doesn't exist on XPort.
Recommend conditionally compiling that out.

#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

# next release ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CameraDriver.cc
- fixed bug: altitude being converted to radians and lat not converted
- changed GPIO_2 active level to active LOW
- added logging of GPGGA string at update time

#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

# mar18_2009 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

CameraDriver.cc
- added support for vicor power supply enable bit on XPort GPIO 2.
- currently active LOW and enabled in the CameraDriver Constructor

CameraDriver.h
- added XPortGPIO vicorEnable member variable

XPortGPIO.cc
- now configures XPort GPIO ActiveLevel and Direction in configure() method that takes an XPort argument

#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

# feb13_2009 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CameraDriver.cc
- changed time_t to struct timeval for sub-second NMEA timestrings
- reworked initialization and time updates accordingly
- fixed bug in NMEA update logic; now updates if elapsed time >0.8s
  to ensure that updates happen at 1 Hz Since the loop runs at 200 ms,
  updates would happen every 1.2 s if you compare elapsed time with 
  1.0 s.

#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

# feb10_2009 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Added support for sub-second resolution. Uses mechanism defined in
sys/time.h [ struct timeval, gettimeofday(), etc.] 

Bicam.h,BicamGPS.cc 
- Added support for sub-second resolution.
- Separated NMEA update into different methods (time, position), 
and provided new methods with timeval arguments instead of struct tm.
- modified some NMEA default initialization arguments that were out of range.
- removed default line termination on NMEA subclass toString (BicamGPS uses 
  NMEA::LineEnd enum to select CRLF style)

bicamTest.cc
- Added support for sub-second resolution (delays in fractional seconds)
- added new support for new command line arguments:
 -n <iterations>     Trigger Iterations (don't stop if <0)
 -t <delaySec>       Delay between triggers (decimal sec)
 -u <delaySec>       Delay between GPS value updates
 -S <delaySec>       Strobe warm-up delay

NMEA.h, GPGGA.cc, GPRMC.cc, NMEA.cc
- Added support for sub-second resolution.
- added struct timeval Field member variable to NMEA w/ supporting methods
- added char buffer to NMEA class to hold toString() output
- reworked implementation of toString to use sprintf instead of c++ streams
- reworked implementation of << operator (now calls new toString())
- added method and member variable to set NMEA timestamp precision using 
  NMEA::TimestampResolution enum type
- added --help command line option
- removed default line termination on NMEA subclass toString methods
- added toString(NMEA::LineEnd) method to select line terminator style.
toString() (no args) uses no line terminator (NOTERM); other options are CRLF 

nmeaTest.cc
- added verbose command line argument; now passed to some methods to provide
  verbose output for some tests
- implemented methods to test toString methods for GPGGA and GPRMC (compare to fixed time)
- added  methods to test toString methods for GPGGA and GPRMC (compare to current time
and uses different precision)...not good unit test, need to refactor
- removed dead code (decimal minutes conversions)
- fixed tests to accomodate NMEA strings w/o CRLF
- changed testGpggaToString(args...) to testGpggaTime(args...) 
- same for Gprmc; now checks that time value and precision are 
correctly set

XPortSim.cc
- added support for verbose (or not, now by default) output

#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

# feb09_2009 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- actual tag date is 10 feb 2009
- tag prior to checking in a bunch of changes for easy rollback
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

# dec15_2008 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

- XPortGPIO.h,cc: new module
	- easier to configure and perform generic GPIO functions
	- more directly represents the underlying XPort API
	- removed _activeMask,_inactiveMask
	- added _directionMask, _activeLevelMask, _stateMask
	- added some new convenience methods 
	- changed several method names and signatures
	- see XPortGPIO.h for details

- XPort.cc:
	- added masking to prevent parameters from going out of range

- XPort.h:
	- added constants XP_GPIO_ALL_INPUTS,XP_GPIO_ALL_OUTPUTS

- Bicam.cc, BicamTrigger.cc: deprecated

- Bicam.h: 
	- removed BicamGPIO defs (replaced with XPortGPIO.h,cc)
	- deprectated BicamTrigger

- bicamTest.cc
	- include strobe enable feature test
	- implement using XPortGPIO
	- use same GPIO configuration as AUV CameraDriver

- CameraDriver.cc,h: 
	- Implement camera trigger using XPortGPIO instead of BicamTrigger
	- Implemented strobeEnable feature using XPortGPIO (enable strobe before photo sequence, disable after)
	- added _strobeEnableStartDelaySec, a parameter to set the strobe warm-up delay, and implemented the delay in readData()
	- standardized use of brackets on all if statements (some had no brackets and style was inconsistent)

- Utils.h, Utils.cc
	- added delay(double delaySec) method to Utils.h,cc

- GWiz.cc: 
	- Uses XPortGPIO
	- added pin mask to specify pins used
	- Use delay() util in GWiz

- Makefile: 
	- added BicamConsts.h to TAR_SOURCE
	- added references to XPortGPIO.cc
	- removed references to BicamTrigger, Bicam.cc

#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# dec12_2008  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

- added release notes to the auv-qnx repository (ReleaseNotes)
- made linux portability changes to camera driver code:
  NMEA.h:
    A virtual destructor was added to the NMEA class in NMEA.h (stops linux compiler warning)

  qnx_port.h, XPortSim.cc, xportTest.cc:
    A typedef SOCKLEN is used to differentiate variable types used in the method signature for socket.accept() on QNX vs Linux/Cygwin. QNX sys/socket.h doesn't define socklen_t (uses int). The SOCKLEN type is set in qnx_port.h. Calling modules instantiate a SOCKLEN, which is socklen_t for linux/cygwin and int for QNX.

  GWiz.cc:
    Now using nanosleep in GWiz.cc instead of usleep, since QNX doesn't implement usleep. This will enable the gwiz utility to build under QNX.
    Note: GWiz utility still untested w/ XPort hardware

#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Dec 4, 2008 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
(untagged)
- version used for initial sea trial