char result[ 100 ];
int retval;
- retval = extract_ph_string( file_path, "cal", "cal->{driver_name}",
+ retval = extract_ph_string( file_path, "cal", "$cal->{driver_name}",
result, sizeof( result ) );
if( retval < 0 ) return retval;
return -1;
}
- retval = extract_ph_string( file_path, "cal", "cal->{board_name}",
+ retval = extract_ph_string( file_path, "cal", "$cal->{board_name}",
result, sizeof( result ) );
if( retval < 0 ) return retval;
char element[ 100 ];
snprintf( element, sizeof( element ),
- "cal->{ calibrations }[ %i ]->{ %s }[ %i ]", cal_index, array_name, array_index );
+ "$cal->{ calibrations }[ %i ]->{ %s }[ %i ]", cal_index, array_name, array_index );
return extract_ph_integer( file_path, "cal", element );
}
char element[ 100 ];
snprintf( element, sizeof( element ),
- "scalar( @{ cal->{ calibrations }[ %i ]->{ %s } } )", cal_index, array_name );
+ "scalar( @{ $cal->{ calibrations }[ %i ]->{ %s } } )", cal_index, array_name );
return extract_ph_integer( file_path, "cal", element );
}
char element[ 100 ];
snprintf( element, sizeof( element ),
- "cal->{ calibrations }[ %i ]->{ subdevice }", cal_index );
+ "$cal->{ calibrations }[ %i ]->{ subdevice }", cal_index );
return extract_ph_integer( file_path, "cal", element );
}
int subdev, channel, value;
char *element;
- asprintf( &element, "cal->{calibrations}[ %i ]->{caldacs}[ %i ]->{subdev}",
+ asprintf( &element, "$cal->{calibrations}[ %i ]->{caldacs}[ %i ]->{subdevice}",
cal_index, i );
subdev = extract_ph_integer( file_path, "cal", element );
free( element );
return subdev;
}
- asprintf( &element, "cal->{calibrations}[ %i ]->{caldacs}[ %i ]->{channel}",
+ asprintf( &element, "$cal->{calibrations}[ %i ]->{caldacs}[ %i ]->{channel}",
cal_index, i );
channel = extract_ph_integer( file_path, "cal", element );
free( element );
return channel;
}
- asprintf( &element, "cal->{calibrations}[ %i ]->{caldacs}[ %i ]->{value}",
+ asprintf( &element, "$cal->{calibrations}[ %i ]->{caldacs}[ %i ]->{value}",
cal_index, i );
value = extract_ph_integer( file_path, "cal", element );
free( element );
retval = comedi_data_write( dev, subdev, channel, 0, 0, value );
if( retval < 0 ) return retval;
}
-
+
return 0;
}