Add new EOT indicator. Send RSSI/cost info for stream data. Update version to 2.4.0.

master v2.4.0
Rob Riggs 2021-09-06 18:19:28 -05:00
rodzic fb29668664
commit 6cdc8f8652
5 zmienionych plików z 23 dodań i 5 usunięć

Wyświetl plik

@ -43,13 +43,13 @@ int powerOffViaUSB(void)
namespace mobilinkd { namespace tnc { namespace kiss {
#if defined(NUCLEOTNC)
const char FIRMWARE_VERSION[] = "2.3.3";
const char FIRMWARE_VERSION[] = "2.4.0";
const char HARDWARE_VERSION[] = "Mobilinkd NucleoTNC";
#elif defined(STM32L433xx)
const char FIRMWARE_VERSION[] = "2.3.3";
const char FIRMWARE_VERSION[] = "2.4.0";
const char HARDWARE_VERSION[] = "Mobilinkd TNC3 2.1.1";
#elif defined(STM32L4P5xx)
const char FIRMWARE_VERSION[] = "2.3.3";
const char FIRMWARE_VERSION[] = "2.4.0";
const char HARDWARE_VERSION[] = "Mobilinkd TNC3+ Rev A";
#endif
Hardware& settings()

Wyświetl plik

@ -28,6 +28,7 @@ constexpr std::array<uint8_t, 2> LSF_SYNC = { 0x55, 0xF7 };
constexpr std::array<uint8_t, 2> STREAM_SYNC = { 0xFF, 0x5D };
constexpr std::array<uint8_t, 2> PACKET_SYNC = { 0x75, 0xFF };
constexpr std::array<uint8_t, 2> BERT_SYNC = { 0xDF, 0x55 };
constexpr std::array<uint8_t, 2> EOT_SYNC = { 0x55, 0x5D };
inline constexpr uint16_t sync_word(std::array<uint8_t, 2> sw)
{

Wyświetl plik

@ -378,6 +378,10 @@ void M17Encoder::send_stream(tnc::hdlc::IoFrame* frame, FrameType)
frame->clear(); // Re-use existing frame.
for (auto c : m17::STREAM_SYNC) frame->push_back(c);
for (auto c : m17_frame) frame->push_back(c);
if (state == State::IDLE)
{
for (auto c : m17::EOT_SYNC) frame->push_back(c);
}
auto status = osMessagePut(
m17EncoderInputQueueHandle,
@ -570,7 +574,11 @@ void M17Encoder::encoderTask(void const*)
HAL_IWDG_Refresh(&hiwdg);
auto frame = static_cast<IoFrame*>(evt.value.p);
if (frame->size() != 48)
if (frame->size() == 50)
{
INFO("EOT");
}
else if (frame->size() != 48)
{
WARN("Bad frame size %u", frame->size());
}

Wyświetl plik

@ -425,14 +425,23 @@ struct M17FrameDecoder
detail::to_frame(stream, output.stream);
detail::to_bytes(output.packet, stream_segment);
stream->push_back(0); // Reserved
// RF signal quality/strength.
if (ber < 128) stream->push_back(255 - ber * 2);
else stream->push_back(0);
if ((ber < 60) && (stream_segment[0] & 0x80))
{
INFO("EOS");
state_ = State::LSF;
result = DecodeResult::EOS;
}
// Bogus CRC bytes to be dropped.
stream->push_back(0);
stream->push_back(0);
stream->source(tnc::hdlc::IoFrame::STREAM);
return result;
}

Wyświetl plik

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