mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-10-31 15:07:12 -04:00
More M17 library cleanup
This commit is contained in:
parent
f00cdc28c9
commit
a7392ab56f
@ -1,4 +1,4 @@
|
||||
// Copyright 2020 modemm17 LLC.
|
||||
// Copyright 2020 Mobilinkd LLC.
|
||||
|
||||
#pragma once
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2020 modemm17 LLC.
|
||||
// Copyright 2020 Mobilinkd LLC.
|
||||
|
||||
#pragma once
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2021 modemm17 LLC.
|
||||
// Copyright 2021 Mobilinkd LLC.
|
||||
|
||||
#pragma once
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2020 modemm17 LLC.
|
||||
// Copyright 2020 Mobilinkd LLC.
|
||||
|
||||
#pragma once
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2021 Rob Riggs <rob@modemm17.com>
|
||||
// Copyright 2021 Rob Riggs <rob@mobilinkd.com>
|
||||
// All rights reserved.
|
||||
|
||||
#pragma once
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2021 modemm17 LLC.
|
||||
// Copyright 2021 Mobilinkd LLC.
|
||||
|
||||
#pragma once
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2020 modemm17 LLC.
|
||||
// Copyright 2020 Mobilinkd LLC.
|
||||
|
||||
#pragma once
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2015-2021 modemm17 LLC.
|
||||
// Copyright 2015-2021 Mobilinkd LLC.
|
||||
|
||||
#pragma once
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2015-2020 modemm17 LLC.
|
||||
// Copyright 2015-2020 Mobilinkd LLC.
|
||||
|
||||
#pragma once
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2021 Rob Riggs <rob@modemm17.com>
|
||||
// Copyright 2021 Rob Riggs <rob@mobilinkd.com>
|
||||
// All rights reserved.
|
||||
|
||||
#pragma once
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2020 modemm17 LLC.
|
||||
// Copyright 2020 Mobilinkd LLC.
|
||||
|
||||
#pragma once
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2020 modemm17 LLC.
|
||||
// Copyright 2020 Mobilinkd LLC.
|
||||
|
||||
#pragma once
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2020 Rob Riggs <rob@modemm17.com>
|
||||
// Copyright 2020 Rob Riggs <rob@mobilinkd.com>
|
||||
// All rights reserved.
|
||||
|
||||
#pragma once
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2015-2021 modemm17 LLC.
|
||||
// Copyright 2015-2021 Mobilinkd LLC.
|
||||
|
||||
#pragma once
|
||||
|
||||
|
@ -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];
|
||||
|
@ -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
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2021 modemm17 LLC.
|
||||
// Copyright 2021 Mobilinkd LLC.
|
||||
|
||||
#pragma once
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2020 modemm17 LLC.
|
||||
// Copyright 2020 Mobilinkd LLC.
|
||||
|
||||
#pragma once
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2020 modemm17 LLC.
|
||||
// Copyright 2020 Mobilinkd LLC.
|
||||
|
||||
#pragma once
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2020 modemm17 LLC.
|
||||
// Copyright 2020 Mobilinkd LLC.
|
||||
|
||||
#pragma once
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2020 modemm17 LLC.
|
||||
// Copyright 2020 Mobilinkd LLC.
|
||||
|
||||
#pragma once
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2020 modemm17 LLC.
|
||||
// Copyright 2020 Mobilinkd LLC.
|
||||
|
||||
#pragma once
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2021 modemm17 LLC.
|
||||
// Copyright 2021 Mobilinkd LLC.
|
||||
|
||||
#pragma once
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2020 modemm17 LLC.
|
||||
// Copyright 2020 Mobilinkd LLC.
|
||||
|
||||
#pragma once
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2020 modemm17 LLC.
|
||||
// Copyright 2020 Mobilinkd LLC.
|
||||
|
||||
#pragma once
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2020 modemm17 LLC.
|
||||
// Copyright 2020 Mobilinkd LLC.
|
||||
|
||||
#pragma once
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user