Commit db2237db authored by Achim Morschhauser's avatar Achim Morschhauser
Browse files

Update

parent 562ddd93
......@@ -52,7 +52,6 @@ int quartz_freq;
double M;
/** Digital filter output rates */
//TODO Make unordered map
double valid_filter_rates[11];
static const int valid_filter_rates_num=11;
const char* filter_cmds[11];
......
......@@ -232,7 +232,6 @@ int Driver_Obs_Serial::set_baud(char* init_chars[], int init_chars_num) {
break;
}
//printf("VB: %d",valid_baudrates_size);
// This has to be in loop as characters received at false baud rate
......
......@@ -114,15 +114,10 @@ driver_obs_obsdaq::driver_obs_obsdaq(std::string port, int baud,
// Set the ObsDAQ baud rate
*/
// Stop the measurement
stop();
}
*/
// Set baud rate
set_baud(baud);
// Initialize
init();
......@@ -435,12 +430,15 @@ int driver_obs_obsdaq::auto_calibrate(int channel, int repeat){
send("#PP00000000");
usleep(1e6);
/////////////////////////////////////////////////////////////////////////
//
// Calibration
//
/////////////////////////////////////////////////////////////////////////
//
// Repeat calibration step
//
for (int k=1; k<=repeat; k++){
......@@ -462,13 +460,12 @@ int driver_obs_obsdaq::auto_calibrate(int channel, int repeat){
sprintf(cmd,"$%1dRO",channel);
send(cmd);
//TODO Repeat loop instead of just omitting
if (receive(recv,sizeof(recv),5)==0) {
// Parse the offset value and add to average
n32 = (uint32_t) strtoul(&recv[3], NULL, 16);
num=0x800000L;
offset += (double) (n32 ^ num) - (double) num;
offset += (double) (n32 ^ num) - (double) num;
}
// Necessary to avoid time outs
......@@ -478,7 +475,6 @@ int driver_obs_obsdaq::auto_calibrate(int channel, int repeat){
sprintf(cmd,"$%1dRF",channel);
send(cmd);
//TODO Repeat loop instead of just omitting
if (receive(recv,sizeof(recv),5)==0) {
// Parse the full-scale value and add to average
......@@ -809,7 +805,7 @@ int driver_obs_obsdaq::parse_data_bin(data_obs_vector* data, char* buf) {
//
// Some checks on data consistency are performed
//
// Check for supplementary channels
if (buf[1] & (unsigned char) 64){
reclen = 14;
......
......@@ -21,7 +21,7 @@ int main(){
std::cout << "BAUD: ";
std::cin >> baud;
driver_serial serial = driver_serial("/dev/ttyUSB1",term,1,baud);
driver_serial serial = driver_serial("/dev/ttyUSB0",term,1,baud);
while (1){
......
# Baudrate for ObsDAQ
BAUD=38400 #19200 (Default)
BAUD=19200 #19200
# PORT for ObsDAQ
PORT=/dev/ttyUSB0
# Resistance of variometer
......
Supports Markdown
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