Commit daf776b3 authored by thomas.forbriger's avatar thomas.forbriger Committed by thomas.forbriger
Browse files

started to implement new debug output

This is a legacy commit from before 2015-03-01.
It may be incomplete as well as inconsistent.
See COPYING.legacy and README.history for details.


SVN Path:     http://gpitrsvn.gpi.uni-karlsruhe.de/repos/TFSoftware/trunk
SVN Revision: 4941
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent e588d982
......@@ -66,7 +66,7 @@ typedef aff::Series<double> Tseries;
/*----------------------------------------------------------------------*/
struct Options {
bool verbose, debug;
bool verbose, debug, debrep;
bool overwrite;
std::string inputformat, outputformat;
}; // struct Options
......@@ -100,6 +100,12 @@ namespace DDAS3 {
#define TRANGE_100K 2
#define TRANGE_475K 3
void report_sidiode_table(int range)
{
std::cout << " to be implemented " << std::endl;
std::cout << " range " << range << std::endl;
} // void report_sidiode_table()
///////////////////////////////////////////////////////////////////////////////
// convert_pt100_ohms_to_celsius
///////////////////////////////////////////////////////////////////////////////
......@@ -190,6 +196,7 @@ namespace DDAS3 {
double x, t, v, vl, vu;
int i, nd, range;
if ( volts < 0.24963 )
// clip value to 410K if out of range e.g.sensor unplugged
return 410.0 ;
......@@ -199,6 +206,8 @@ namespace DDAS3 {
// clip value to 1.4K if out of range //changed 09/08
return 1.40 ;
// std::cout << "\n\nDEBUG in SIDIODE4: " << volts << std::endl;
if ( volts > VU[TRANGE_12K] ) range = 0 ;
else if ( volts>VU[TRANGE_24K ] && volts<=VU[TRANGE_12K ] ) range = 0;
else if ( volts>VU[TRANGE_100K] && volts<=VU[TRANGE_24K ] ) range = 1;
......@@ -829,6 +838,7 @@ int main(int iargc, char* argv[])
"-xhelp print detailed information regarding file formats" "\n"
"-v be verbose" "\n"
"-DEBUG produce debug output" "\n"
"-DEBREP report internal scaling values for debugging" "\n"
"-o overwrite output" "\n"
"-itype type choose input file format (default: sff)" "\n"
"-otype type choose output file format (default: sff)" "\n"
......@@ -852,6 +862,8 @@ int main(int iargc, char* argv[])
{"DEBUG",arg_no,"-"},
// 6: output file format
{"xhelp",arg_no,"-"},
// 7: generate debug output
{"DEBREP",arg_no,"-"},
{NULL}
};
......@@ -898,6 +910,21 @@ int main(int iargc, char* argv[])
opt.outputformat=cmdline.string_arg(4);
opt.debug=cmdline.optset(5);
// 6 is --xhelp
opt.debrep=cmdline.optset(7);
/*======================================================================*/
if (opt.debrep) {
cout << SIGSCALE_VERSION << endl << SIGSCALE_CVSID << endl;
DDAS3::report_sidiode_table(TRANGE_12K);
DDAS3::report_sidiode_table(TRANGE_24K);
DDAS3::report_sidiode_table(TRANGE_100K);
DDAS3::report_sidiode_table(TRANGE_475K);
exit(2);
}
/*======================================================================*/
if (opt.verbose)
{ cout << SIGSCALE_VERSION << endl << SIGSCALE_CVSID << endl; }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment