Skip to content

Commit

Permalink
Merge branch 'SatDump:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
OK9UWU authored Jan 16, 2024
2 parents 50eddc9 + 1e54f63 commit 2d80719
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 13 deletions.
3 changes: 1 addition & 2 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@

<application
android:label="SatDump"
android:allowBackup="false"
android:fullBackupContent="false"
android:allowBackup="true"
android:hasCode="true"
android:extractNativeLibs="true">
<!--android:requestLegacyExternalStorage="true"-->
Expand Down
15 changes: 11 additions & 4 deletions plugins/goes_support/goes/hrit/data/goes_r_fc_composer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,19 @@ namespace goes

// Not really necessary, but good to be safe
if (ch2.height() > 0)
ch13.resize(ch2.width(), ch2.height());
{
if(ch13.height() != ch2.height())
{
ch13.resize(ch2.width(), ch2.height());
}
}
else
{
ch2.resize(ch13.width(), ch13.height());
}


if(!hasData || falsecolor.width() != ch2.width())
falsecolor = image::Image<uint8_t>(ch2.width(), ch2.height(), 3); // Init image
falsecolor.init(ch2.width(), ch2.height(), 3); // Init image

for (size_t i = 0; i < ch2.width() * ch2.height(); i++)
{
Expand Down Expand Up @@ -102,4 +109,4 @@ namespace goes
imageStatus = IDLE;
}
}
}
}
4 changes: 3 additions & 1 deletion src-core/common/lrit/lrit_demux.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ namespace lrit
{
logger->error("LRIT CRC is invalid... Skipping.");
current_file.file_in_progress = false;
std::vector<uint8_t>().swap(current_file.lrit_data);
}
continue;
}
Expand Down Expand Up @@ -99,6 +100,7 @@ namespace lrit
processLRITData(current_file, pkt);
finalizeLRITData(current_file);
current_file.file_in_progress = false;
std::vector<uint8_t>().swap(current_file.lrit_data);
}
}

Expand Down Expand Up @@ -140,4 +142,4 @@ namespace lrit
onFinalizeData(file);
files.push_back(file);
}
};
};
18 changes: 12 additions & 6 deletions src-interface/recorder/recorder_proc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -313,14 +313,20 @@ namespace satdump
timestamp += ss.str();
}

std::string filename = config::main_cfg["satdump_directories"]["recording_path"]["value"].get<std::string>() +
"/" + timestamp + "_" + std::to_string(get_samplerate()) + "SPS_" +
std::to_string(frequency_hz) + "Hz";
std::string recording_path = config::main_cfg["satdump_directories"]["recording_path"]["value"].get<std::string>();
#if defined(_MSC_VER)
recording_path += "\\";
#elif defined(__ANDROID__)
if (recording_path == ".")
recording_path = "/storage/emulated/0";
recording_path += "/";
#else
recording_path += "/";
#endif

std::string filename = recording_path + timestamp + "_" + std::to_string(get_samplerate()) + "SPS_" + std::to_string(frequency_hz) + "Hz";
recorder_filename = file_sink->start_recording(filename, get_samplerate(), ziq_bit_depth);

logger->info("Recording to " + recorder_filename);

is_recording = true;
}

Expand Down Expand Up @@ -386,4 +392,4 @@ namespace satdump
};
}
}
}
}

0 comments on commit 2d80719

Please sign in to comment.