Updated firmware binary

This commit is contained in:
furrtek 2017-08-12 17:51:52 +01:00
parent 96880d2fc6
commit 81eb96f870
4 changed files with 7 additions and 3 deletions

View File

@ -125,7 +125,7 @@ uint16_t WAVFileReader::bits_per_sample() {
Optional<File::Error> WAVFileWriter::create(
const std::filesystem::path& filename,
size_t sampling_rate_set,
std::string title_set
const std::string& title_set
) {
sampling_rate = sampling_rate_set;
title = title_set;
@ -139,19 +139,24 @@ Optional<File::Error> WAVFileWriter::create(
Optional<File::Error> WAVFileWriter::update_header() {
header_t header { sampling_rate, (uint32_t)bytes_written - sizeof(header_t), info_chunk_size };
const auto seek_0_result = file.seek(0);
if( seek_0_result.is_error() ) {
return seek_0_result.error();
}
const auto old_position = seek_0_result.value();
const auto write_result = file.write(&header, sizeof(header));
if( write_result.is_error() ) {
return write_result.error();
}
const auto seek_old_result = file.seek(old_position);
if( seek_old_result.is_error() ) {
return seek_old_result.error();
}
return { };
}

View File

@ -173,7 +173,7 @@ public:
Optional<File::Error> create(
const std::filesystem::path& filename,
size_t sampling_rate,
std::string title_set
const std::string& title_set
);
private:

View File

@ -23,7 +23,6 @@
// Color bitmaps generated with:
// 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: Check AFSK transmit end, skips last bits ?
//TEST: Imperial in whipcalc

Binary file not shown.