mirror of
https://github.com/eried/portapack-mayhem.git
synced 2024-10-01 01:26:06 -04:00
Updated firmware binary
This commit is contained in:
parent
96880d2fc6
commit
81eb96f870
@ -125,7 +125,7 @@ uint16_t WAVFileReader::bits_per_sample() {
|
|||||||
Optional<File::Error> WAVFileWriter::create(
|
Optional<File::Error> WAVFileWriter::create(
|
||||||
const std::filesystem::path& filename,
|
const std::filesystem::path& filename,
|
||||||
size_t sampling_rate_set,
|
size_t sampling_rate_set,
|
||||||
std::string title_set
|
const std::string& title_set
|
||||||
) {
|
) {
|
||||||
sampling_rate = sampling_rate_set;
|
sampling_rate = sampling_rate_set;
|
||||||
title = title_set;
|
title = title_set;
|
||||||
@ -139,19 +139,24 @@ Optional<File::Error> WAVFileWriter::create(
|
|||||||
|
|
||||||
Optional<File::Error> WAVFileWriter::update_header() {
|
Optional<File::Error> WAVFileWriter::update_header() {
|
||||||
header_t header { sampling_rate, (uint32_t)bytes_written - sizeof(header_t), info_chunk_size };
|
header_t header { sampling_rate, (uint32_t)bytes_written - sizeof(header_t), info_chunk_size };
|
||||||
|
|
||||||
const auto seek_0_result = file.seek(0);
|
const auto seek_0_result = file.seek(0);
|
||||||
if( seek_0_result.is_error() ) {
|
if( seek_0_result.is_error() ) {
|
||||||
return seek_0_result.error();
|
return seek_0_result.error();
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto old_position = seek_0_result.value();
|
const auto old_position = seek_0_result.value();
|
||||||
|
|
||||||
const auto write_result = file.write(&header, sizeof(header));
|
const auto write_result = file.write(&header, sizeof(header));
|
||||||
if( write_result.is_error() ) {
|
if( write_result.is_error() ) {
|
||||||
return write_result.error();
|
return write_result.error();
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto seek_old_result = file.seek(old_position);
|
const auto seek_old_result = file.seek(old_position);
|
||||||
if( seek_old_result.is_error() ) {
|
if( seek_old_result.is_error() ) {
|
||||||
return seek_old_result.error();
|
return seek_old_result.error();
|
||||||
}
|
}
|
||||||
|
|
||||||
return { };
|
return { };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -173,7 +173,7 @@ public:
|
|||||||
Optional<File::Error> create(
|
Optional<File::Error> create(
|
||||||
const std::filesystem::path& filename,
|
const std::filesystem::path& filename,
|
||||||
size_t sampling_rate,
|
size_t sampling_rate,
|
||||||
std::string title_set
|
const std::string& title_set
|
||||||
);
|
);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -23,7 +23,6 @@
|
|||||||
// Color bitmaps generated with:
|
// Color bitmaps generated with:
|
||||||
// Gimp image > indexed colors (16), then "xxd -i *.bmp"
|
// Gimp image > indexed colors (16), then "xxd -i *.bmp"
|
||||||
|
|
||||||
//TEST: ADS-B tx velocity and squawk frames
|
|
||||||
//TEST: Menuview refresh, seems to blink a lot
|
//TEST: Menuview refresh, seems to blink a lot
|
||||||
//TEST: Check AFSK transmit end, skips last bits ?
|
//TEST: Check AFSK transmit end, skips last bits ?
|
||||||
//TEST: Imperial in whipcalc
|
//TEST: Imperial in whipcalc
|
||||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user