mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2024-12-29 11:06:18 +00:00
t/file: Expose non-hack version of the calibration data save function
This commit is contained in:
parent
f47c384b79
commit
7b049a9d65
1
doc/changes/aux/mr.266.3.md
Normal file
1
doc/changes/aux/mr.266.3.md
Normal file
|
@ -0,0 +1 @@
|
|||
tracking: Expose save function with none hardcode path for calibration data.
|
|
@ -268,7 +268,8 @@ t_stereo_camera_calibration_load_v1(
|
|||
*/
|
||||
|
||||
extern "C" bool
|
||||
t_file_save_raw_data(FILE *calib_file, struct t_stereo_camera_calibration *data)
|
||||
t_stereo_camera_calibration_save_v1(FILE *calib_file,
|
||||
struct t_stereo_camera_calibration *data)
|
||||
{
|
||||
StereoCameraCalibrationWrapper wrapped(data);
|
||||
// Dummy matrix
|
||||
|
@ -343,7 +344,8 @@ t_stereo_camera_calibration_load_v1_hack(
|
|||
}
|
||||
|
||||
extern "C" bool
|
||||
t_file_save_raw_data_hack(struct t_stereo_camera_calibration *data)
|
||||
t_stereo_camera_calibration_save_v1_hack(
|
||||
struct t_stereo_camera_calibration *data)
|
||||
{
|
||||
char path_string[PATH_MAX];
|
||||
char file_string[PATH_MAX];
|
||||
|
@ -366,7 +368,7 @@ t_file_save_raw_data_hack(struct t_stereo_camera_calibration *data)
|
|||
return false;
|
||||
}
|
||||
|
||||
t_file_save_raw_data(calib_file, data);
|
||||
t_stereo_camera_calibration_save_v1(calib_file, data);
|
||||
|
||||
fclose(calib_file);
|
||||
|
||||
|
|
|
@ -185,12 +185,20 @@ bool
|
|||
t_stereo_camera_calibration_load_v1_hack(
|
||||
struct t_stereo_camera_calibration **out_data);
|
||||
|
||||
/*!
|
||||
* Save the given stereo calibration data to the given file.
|
||||
*/
|
||||
bool
|
||||
t_stereo_camera_calibration_save_v1(FILE *calib_file,
|
||||
struct t_stereo_camera_calibration *data);
|
||||
|
||||
/*!
|
||||
* Save raw calibration data to file, hack until prober has storage for such
|
||||
* things.
|
||||
*/
|
||||
bool
|
||||
t_file_save_raw_data_hack(struct t_stereo_camera_calibration *data);
|
||||
t_stereo_camera_calibration_save_v1_hack(
|
||||
struct t_stereo_camera_calibration *data);
|
||||
|
||||
|
||||
/*
|
||||
|
|
|
@ -66,7 +66,7 @@ save_calibration(struct calibration_scene *cs)
|
|||
}
|
||||
|
||||
// Save the data.
|
||||
t_file_save_raw_data_hack(cs->status.stereo_data);
|
||||
t_stereo_camera_calibration_save_v1_hack(cs->status.stereo_data);
|
||||
|
||||
// Free data, no longer needed.
|
||||
t_stereo_camera_calibration_reference(&cs->status.stereo_data, NULL);
|
||||
|
|
Loading…
Reference in a new issue