mirror of
https://github.com/eried/portapack-mayhem.git
synced 2024-12-25 15:29:37 -05:00
Constructor style clean-up.
This commit is contained in:
parent
db416fd670
commit
ebf103363c
@ -49,13 +49,8 @@ public:
|
|||||||
|
|
||||||
if( count >= samples_per_update ) {
|
if( count >= samples_per_update ) {
|
||||||
const float max_squared_f = max_squared;
|
const float max_squared_f = max_squared;
|
||||||
const float max_db_f = complex16_mag_squared_to_dbv_norm(max_squared_f);
|
const int32_t max_db = complex16_mag_squared_to_dbv_norm(max_squared_f);
|
||||||
const int32_t max_db = max_db_f;
|
callback({ max_db, count });
|
||||||
const ChannelStatistics statistics {
|
|
||||||
.max_db = max_db,
|
|
||||||
.count = count,
|
|
||||||
};
|
|
||||||
callback(statistics);
|
|
||||||
|
|
||||||
max_squared = 0;
|
max_squared = 0;
|
||||||
count = 0;
|
count = 0;
|
||||||
|
@ -69,8 +69,7 @@ struct RSSIStatistics {
|
|||||||
class RSSIStatisticsMessage : public Message {
|
class RSSIStatisticsMessage : public Message {
|
||||||
public:
|
public:
|
||||||
constexpr RSSIStatisticsMessage(
|
constexpr RSSIStatisticsMessage(
|
||||||
) : Message { ID::RSSIStatistics },
|
) : Message { ID::RSSIStatistics }
|
||||||
statistics { }
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -88,8 +87,7 @@ struct BasebandStatistics {
|
|||||||
class BasebandStatisticsMessage : public Message {
|
class BasebandStatisticsMessage : public Message {
|
||||||
public:
|
public:
|
||||||
constexpr BasebandStatisticsMessage(
|
constexpr BasebandStatisticsMessage(
|
||||||
) : Message { ID::BasebandStatistics },
|
) : Message { ID::BasebandStatistics }
|
||||||
statistics { }
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -101,14 +99,8 @@ struct ChannelStatistics {
|
|||||||
size_t count;
|
size_t count;
|
||||||
|
|
||||||
constexpr ChannelStatistics(
|
constexpr ChannelStatistics(
|
||||||
) : max_db { -120 },
|
int32_t max_db = -120,
|
||||||
count { 0 }
|
size_t count = 0
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
constexpr ChannelStatistics(
|
|
||||||
int32_t max_db,
|
|
||||||
size_t count
|
|
||||||
) : max_db { max_db },
|
) : max_db { max_db },
|
||||||
count { count }
|
count { count }
|
||||||
{
|
{
|
||||||
@ -118,8 +110,7 @@ struct ChannelStatistics {
|
|||||||
class ChannelStatisticsMessage : public Message {
|
class ChannelStatisticsMessage : public Message {
|
||||||
public:
|
public:
|
||||||
constexpr ChannelStatisticsMessage(
|
constexpr ChannelStatisticsMessage(
|
||||||
) : Message { ID::ChannelStatistics },
|
) : Message { ID::ChannelStatistics }
|
||||||
statistics { }
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -200,17 +191,12 @@ public:
|
|||||||
|
|
||||||
struct AISPacket {
|
struct AISPacket {
|
||||||
std::bitset<1024> payload;
|
std::bitset<1024> payload;
|
||||||
size_t bits_received;
|
size_t bits_received { 0 };
|
||||||
|
|
||||||
AISPacket(
|
|
||||||
) : bits_received { 0 }
|
|
||||||
{
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class AISPacketMessage : public Message {
|
class AISPacketMessage : public Message {
|
||||||
public:
|
public:
|
||||||
AISPacketMessage(
|
constexpr AISPacketMessage(
|
||||||
) : Message { ID::AISPacket }
|
) : Message { ID::AISPacket }
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -220,17 +206,12 @@ public:
|
|||||||
|
|
||||||
struct TPMSPacket {
|
struct TPMSPacket {
|
||||||
std::bitset<1024> payload;
|
std::bitset<1024> payload;
|
||||||
size_t bits_received;
|
size_t bits_received { 0 };
|
||||||
|
|
||||||
TPMSPacket(
|
|
||||||
) : bits_received { 0 }
|
|
||||||
{
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class TPMSPacketMessage : public Message {
|
class TPMSPacketMessage : public Message {
|
||||||
public:
|
public:
|
||||||
TPMSPacketMessage(
|
constexpr TPMSPacketMessage(
|
||||||
) : Message { ID::TPMSPacket }
|
) : Message { ID::TPMSPacket }
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user