Laelaps  2.3.5
RoadNarrows Robotics Small Outdoor Mobile Robot Project
laelaps_tof.cxx File Reference

Test and calibrate Laelaps Time-of-Flight sensors. More...

#include <unistd.h>
#include <termios.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <iostream>
#include <fstream>
#include <string>
#include "rnr/rnrconfig.h"
#include "rnr/log.h"
#include "rnr/opts.h"
#include "rnr/pkg.h"
#include "Laelaps/laelaps.h"
#include "Laelaps/laeUtils.h"
#include "Laelaps/laeSysDev.h"
#include "Laelaps/laeI2C.h"
#include "Laelaps/laeI2CMux.h"
#include "Laelaps/laeVL6180.h"
#include "version.h"

Go to the source code of this file.

Macros

#define APP_EC_OK   0
 success exit code
 
#define APP_EC_ARGS   2
 command-line options/arguments error exit code
 
#define APP_EC_EXEC   4
 execution exit code
 

Enumerations

enum  MeasType {
  MeasTypeDistance,
  MeasTypeAmbient,
  MeasTypeBoth
}
 

Functions

static int OptsCvtArgMeas (const char *argv0, const char *sOptName, char *optarg, void *pOptVal)
 
static int tofNameToInt (const string &str, int &val)
 
static int strToInt (const string &str, int &val)
 
int getch ()
 
int kbhit ()
 
static int connectSensor (int n)
 
static int readSensorInfo ()
 
static int calibrateSensorCrossTalk ()
 
static int calibrateSensorOffset ()
 
static void readSensorCalibTuneRegs ()
 
static void printHdr (int what)
 
static void printMeasurement (int seqnum, int what, double fMeters, double fFlux)
 
static int measure ()
 
static void mainInit (int argc, char *argv[])
 Main initialization. More...
 
int main (int argc, char *argv[])
 Main. More...
 

Variables

static char * Argv0
 the command
 
static bool_t OptsNoAuto = false
 don't auto-run
 
static int OptsTimePeriod = 500
 sense time period (msec)
 
static char * OptsMeasure = (char *)"range"
 measure range
 
static bool_t OptsCalibOffset = false
 do [not] calibrate range offset
 
static bool_t OptsCalibXTalk = false
 do [not] calibrate range crosstalk
 
static const char * ToFName []
 
static const double ToFDir []
 
static int SensorId
 
static int Measure
 
static LaeI2C I2CBus
 
static LaeI2CMux I2CMux (I2CBus)
 
static LaeVL6180MuxToFSensor
 
static const char * Sep
 
static OptsPgmInfo_T PgmInfo
 Program information. More...
 
static OptsInfo_T OptsInfo []
 Command line options information.
 

Detailed Description

Test and calibrate Laelaps Time-of-Flight sensors.

LastChangedDate
2015-01-15 12:45:22 -0700 (Thu, 15 Jan 2015)
Rev
3857
Author
Robin Knight (robin.nosp@m..kni.nosp@m.ght@r.nosp@m.oadn.nosp@m.arrow.nosp@m.s.co.nosp@m.m)
Copyright
© 2015-2018. RoadNarrows LLC.
http://www.roadnarrows.com
All Rights Reserved

Definition in file laelaps_tof.cxx.