1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-21 15:51:47 -05:00

More M17 library cleanup

This commit is contained in:
f4exb 2022-07-20 09:07:00 +02:00
parent f00cdc28c9
commit a7392ab56f
28 changed files with 32 additions and 31 deletions

View File

@ -1,4 +1,4 @@
// Copyright 2020 modemm17 LLC.
// Copyright 2020 Mobilinkd LLC.
#pragma once

View File

@ -1,4 +1,4 @@
// Copyright 2020 modemm17 LLC.
// Copyright 2020 Mobilinkd LLC.
#pragma once

View File

@ -1,4 +1,4 @@
// Copyright 2021 modemm17 LLC.
// Copyright 2021 Mobilinkd LLC.
#pragma once

View File

@ -1,4 +1,4 @@
// Copyright 2020 modemm17 LLC.
// Copyright 2020 Mobilinkd LLC.
#pragma once

View File

@ -1,4 +1,4 @@
// Copyright 2021 Rob Riggs <rob@modemm17.com>
// Copyright 2021 Rob Riggs <rob@mobilinkd.com>
// All rights reserved.
#pragma once

View File

@ -1,4 +1,4 @@
// Copyright 2021 modemm17 LLC.
// Copyright 2021 Mobilinkd LLC.
#pragma once

View File

@ -1,4 +1,4 @@
// Copyright 2020 modemm17 LLC.
// Copyright 2020 Mobilinkd LLC.
#pragma once

View File

@ -1,4 +1,4 @@
// Copyright 2015-2021 modemm17 LLC.
// Copyright 2015-2021 Mobilinkd LLC.
#pragma once

View File

@ -1,4 +1,4 @@
// Copyright 2015-2020 modemm17 LLC.
// Copyright 2015-2020 Mobilinkd LLC.
#pragma once

View File

@ -1,4 +1,4 @@
// Copyright 2021 Rob Riggs <rob@modemm17.com>
// Copyright 2021 Rob Riggs <rob@mobilinkd.com>
// All rights reserved.
#pragma once

View File

@ -1,4 +1,4 @@
// Copyright 2020 modemm17 LLC.
// Copyright 2020 Mobilinkd LLC.
#pragma once

View File

@ -1,4 +1,4 @@
// Copyright 2020 modemm17 LLC.
// Copyright 2020 Mobilinkd LLC.
#pragma once

View File

@ -1,4 +1,4 @@
// Copyright 2020 Rob Riggs <rob@modemm17.com>
// Copyright 2020 Rob Riggs <rob@mobilinkd.com>
// All rights reserved.
#pragma once

View File

@ -1,4 +1,4 @@
// Copyright 2015-2021 modemm17 LLC.
// Copyright 2015-2021 Mobilinkd LLC.
#pragma once

View File

@ -1,11 +1,11 @@
// Copyright 2020 modemm17 LLC.
// Copyright 2020 Mobilinkd LLC.
#pragma once
#include <array>
#include <cstdint>
#include <cmath>
#include <string_view> // Don't have std::span in C++17.
// #include <string_view> // Don't have std::span in C++17.
#include <stdexcept>
#include <algorithm>
@ -56,11 +56,11 @@ struct LinkSetupFrame
for (auto c : callsign)
{
encoded *= 40;
if (c >= 'A' and c <= 'Z')
if ((c >= 'A') && (c <= 'Z'))
{
encoded += c - 'A' + 1;
}
else if (c >= '0' and c <= '9')
else if ((c >= '0') && (c <= '9'))
{
encoded += c - '0' + 27;
}
@ -112,6 +112,7 @@ struct LinkSetupFrame
// decode each base-40 digit and map them to the appriate character.
result.fill(0);
size_t index = 0;
while (encoded)
{
result[index++] = callsign_map[encoded % 40];

View File

@ -1,4 +1,4 @@
// Copyright 2020-2021 Rob Riggs <rob@modemm17.com>
// Copyright 2020-2021 Rob Riggs <rob@mobilinkd.com>
// All rights reserved.
#pragma once

View File

@ -1,4 +1,4 @@
// Copyright 2021 modemm17 LLC.
// Copyright 2021 Mobilinkd LLC.
#pragma once

View File

@ -1,4 +1,4 @@
// Copyright 2020 modemm17 LLC.
// Copyright 2020 Mobilinkd LLC.
#pragma once

View File

@ -1,4 +1,4 @@
// Copyright 2020 modemm17 LLC.
// Copyright 2020 Mobilinkd LLC.
#pragma once

View File

@ -1,4 +1,4 @@
// Copyright 2020 modemm17 LLC.
// Copyright 2020 Mobilinkd LLC.
#pragma once

View File

@ -1,4 +1,4 @@
// Copyright 2020 modemm17 LLC.
// Copyright 2020 Mobilinkd LLC.
#pragma once

View File

@ -1,4 +1,4 @@
// Copyright 2020 modemm17 LLC.
// Copyright 2020 Mobilinkd LLC.
#pragma once

View File

@ -1,4 +1,4 @@
// Copyright 2021 modemm17 LLC.
// Copyright 2021 Mobilinkd LLC.
#pragma once

View File

@ -1,4 +1,4 @@
// Copyright 2020 modemm17 LLC.
// Copyright 2020 Mobilinkd LLC.
#pragma once

View File

@ -1,4 +1,4 @@
// Copyright 2020-2021 modemm17 LLC.
// Copyright 2020-2021 Mobilinkd LLC.
// make CXXFLAGS="$(pkg-config --cflags gtest) $(pkg-config --libs gtest) -I. -O3" tests/TrellisTest

View File

@ -1,4 +1,4 @@
// Copyright 2020 modemm17 LLC.
// Copyright 2020 Mobilinkd LLC.
#pragma once

View File

@ -1,4 +1,4 @@
// Copyright 2020 modemm17 LLC.
// Copyright 2020 Mobilinkd LLC.
#pragma once

View File

@ -1,4 +1,4 @@
// Copyright 2012-2021 Rob Riggs <rob@modemm17.com>
// Copyright 2012-2021 Rob Riggs <rob@mobilinkd.com>
// All rights reserved.
#pragma once