summaryrefslogtreecommitdiff
path: root/Network/PSKReporter.cpp
diff options
context:
space:
mode:
authorChristoph Berg <myon@debian.org>2023-01-08 21:38:57 +0100
committerChristoph Berg <myon@debian.org>2023-01-08 21:38:57 +0100
commitfeb1845d2d46452ef74746657a6f89845b1b7ac9 (patch)
tree5d1ff0ae92c5bd7c984a727b26116f6b6564f75a /Network/PSKReporter.cpp
parent4bbf5124f399f0b7c2f9f95def8a6ff9dc22315e (diff)
parent1a98fb3da0d436b86c887261b39f77bfd3911fd5 (diff)
Update upstream source from tag 'upstream/2.6.0+repack'
Update to upstream version '2.6.0+repack' with Debian dir 52967dc66c3025ae0e5ce99989c650a8d2a8ebac
Diffstat (limited to 'Network/PSKReporter.cpp')
-rwxr-xr-xNetwork/PSKReporter.cpp17
1 files changed, 14 insertions, 3 deletions
diff --git a/Network/PSKReporter.cpp b/Network/PSKReporter.cpp
index 88918ef7..4db1d756 100755
--- a/Network/PSKReporter.cpp
+++ b/Network/PSKReporter.cpp
@@ -299,7 +299,7 @@ void PSKReporter::impl::build_preamble (QDataStream& message)
<< quint16 (0xffff) // Option 1 Field Length (variable)
<< quint32 (30351u) // Option 1 Enterprise Number
<< quint16 (0x8000 + 5u) // Option 2 Information Element ID (frequency)
- << quint16 (4u) // Option 2 Field Length
+ << quint16 (5u) // Option 2 Field Length
<< quint32 (30351u) // Option 2 Enterprise Number
<< quint16 (0x8000 + 6u) // Option 3 Information Element ID (sNR)
<< quint16 (1u) // Option 3 Field Length
@@ -423,8 +423,19 @@ void PSKReporter::impl::send_report (bool send_residue)
// Sender information
writeUtfString (tx_out, spot.call_);
- tx_out
- << static_cast<quint32> (spot.freq_)
+ uint8_t data[5];
+ long long int i64 = spot.freq_;
+ data[0] = ( i64 & 0xff);
+ data[1] = ((i64 >> 8) & 0xff);
+ data[2] = ((i64 >> 16) & 0xff);
+ data[3] = ((i64 >> 24) & 0xff);
+ data[4] = ((i64 >> 32) & 0xff);
+ tx_out // BigEndian
+ << static_cast<uint8_t> (data[4])
+ << static_cast<uint8_t> (data[3])
+ << static_cast<uint8_t> (data[2])
+ << static_cast<uint8_t> (data[1])
+ << static_cast<uint8_t> (data[0])
<< static_cast<qint8> (spot.snr_);
writeUtfString (tx_out, spot.mode_);
writeUtfString (tx_out, spot.grid_);