#ifndef _GEOSAMPLER_H
#define _GEOSAMPLER_H
#include "GeoApp.h"
#include "IbcMicroSampler.h"

#define BITS_TO_DEGS(bits) ((bits / 193) - 10) 
// Need a DM Period for Geology Sled.
#define MWSLED_IBC_DM_PERIOD    500000 //Mwsled Dcon Data Period 2 hz.
#define HUMIDITY_DM_PERIOD     2000000 //HUMIDITY Period .5 hz
#define ATOD_PERIOD             100000 //A to D channel Period 10 hz.
/*
CLASS 
GeoSampler

DESCRIPTION
Periodic sample and process application specific data from micro

AUTHOR
Douglas Au
*/

class GeoSampler : public IbcMicroSampler
{
  public:

  ///////////////////////////////////////////////////////////////////
  // Constructor
  // [input] name: application name
  // [input] MICRO: Parent MicroApp
  GeoSampler(const char *name, GeoApp *micro);
  ~GeoSampler();

  protected:

  ///////////////////////////////////////////////////////////////////
  // Saves the last state of Spare Digital Inputs
  MBool lastSpareDigitalInput0;
  
  ///////////////////////////////////////////////////////////////////
  // Updates Digital input Values from Isolated I/O Board
  void updateDigitalInputs();
  
  ///////////////////////////////////////////////////////////////////
  // Initializes Index Sense Value on startup
  void initDigitalInputs();

  ///////////////////////////////////////////////////////////////////
  // Pointer to the main app
  GeoApp *_geoApp;
 
};


#endif













