Merge pull request #1005 from mwalker33/data-save

Data save
This commit is contained in:
Iceman 2020-10-12 08:51:07 +02:00 committed by GitHub
commit cf7796aeaf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1949,7 +1949,7 @@ int CmdSave(const char *Cmd) {
void *argtable[] = { void *argtable[] = {
arg_param_begin, arg_param_begin,
arg_lit0("w", "wave", "save as wave format (.wav)"), arg_lit0("w", "wave", "save as wave format (.wav)"),
arg_strx0("f", "file", "<fn w/o ext>", "save file name"), arg_str1("f", "file", "<fn w/o ext>", "save file name"),
arg_param_end arg_param_end
}; };
CLIExecWithReturn(ctx, Cmd, argtable, false); CLIExecWithReturn(ctx, Cmd, argtable, false);
@ -1958,7 +1958,9 @@ int CmdSave(const char *Cmd) {
int fnlen = 0; int fnlen = 0;
char filename[FILE_PATH_SIZE] = {0}; char filename[FILE_PATH_SIZE] = {0};
CLIGetStrWithReturn(ctx, 2, (uint8_t *)filename, &fnlen); // CLIGetStrWithReturn(ctx, 2, (uint8_t *)filename, &fnlen);
CLIParamStrToBuf(arg_get_str(ctx, 2), (uint8_t *)filename, FILE_PATH_SIZE, &fnlen);
CLIParserFree(ctx); CLIParserFree(ctx);
if (as_wave) if (as_wave)