Skip to content

Commit

Permalink
plugins: adrv9002: moved temporary profile gen files
Browse files Browse the repository at this point in the history
- windows required admin privileges to save within Program Files

Signed-off-by: Andrei Popa <[email protected]>
  • Loading branch information
andrei47w committed Nov 24, 2023
1 parent ce10c60 commit 51cdb14
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions plugins/adrv9002.c
Original file line number Diff line number Diff line change
Expand Up @@ -2041,7 +2041,9 @@ static int profile_gen_save_to_file(gchar *filename, struct adrv9002_config *cfg
// run profile gen cli command
FILE *file;
int ret = 0;
char command[BUFSIZ], *config_filename = "adrv9002_config.json";
char command[BUFSIZ];
char *config_filename = g_build_filename(getenv("TEMP") ?: P_tmpdir, "adrv9002_config.json", NULL);

profile_gen_write_config_to_file(config_filename, cfg);

if (file_type) { // profile
Expand Down Expand Up @@ -2178,8 +2180,10 @@ static void profile_gen_load_config_to_device(GtkButton *self, gpointer data)

// run profile gen cli command
FILE *file;
char command[BUFSIZ], *config_filename = "adrv9002_config.json", *profile_filename = "adrv9002_profile.json",
*stream_filename = "adrv9002_stream.stream";
char command[BUFSIZ];
char *config_filename = g_build_filename(getenv("TEMP") ?: P_tmpdir, "adrv9002_config.json", NULL);
char *profile_filename = g_build_filename(getenv("TEMP") ?: P_tmpdir, "adrv9002_profile.json", NULL);
char *stream_filename = g_build_filename(getenv("TEMP") ?: P_tmpdir, "adrv9002_stream.json", NULL);

profile_gen_write_config_to_file(config_filename, &cfg);
sprintf(command, "%s --config %s --profile %s --stream %s",
Expand Down

0 comments on commit 51cdb14

Please sign in to comment.