aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Transceiver52M/Transceiver.h2
-rw-r--r--Transceiver52M/Transceiver2.h2
-rw-r--r--Transceiver52M/radioVector.cpp10
-rw-r--r--Transceiver52M/radioVector.h4
4 files changed, 9 insertions, 9 deletions
diff --git a/Transceiver52M/Transceiver.h b/Transceiver52M/Transceiver.h
index 45a4159..0389e60 100644
--- a/Transceiver52M/Transceiver.h
+++ b/Transceiver52M/Transceiver.h
@@ -80,7 +80,7 @@ struct TransceiverState {
/* Received noise energy levels */
float mNoiseLev;
- noiseVector mNoises;
+ avgVector mNoises;
/* Shadowed downlink attenuation */
int mPower;
diff --git a/Transceiver52M/Transceiver2.h b/Transceiver52M/Transceiver2.h
index e5579f4..913ee1e 100644
--- a/Transceiver52M/Transceiver2.h
+++ b/Transceiver52M/Transceiver2.h
@@ -69,7 +69,7 @@ struct TransceiverState {
bool mRetrans;
/* Received noise energy levels */
- noiseVector mFreqOffsets;
+ avgVector mFreqOffsets;
/* Store pointers to previous frame */
radioVector *prevFrame[8];
diff --git a/Transceiver52M/radioVector.cpp b/Transceiver52M/radioVector.cpp
index 2e85d7a..ceff2ad 100644
--- a/Transceiver52M/radioVector.cpp
+++ b/Transceiver52M/radioVector.cpp
@@ -76,12 +76,12 @@ bool radioVector::setVector(signalVector *vector, size_t chan)
return true;
}
-noiseVector::noiseVector(size_t size)
+avgVector::avgVector(size_t size)
: std::vector<float>(size), itr(0)
{
}
-float noiseVector::avg() const
+float avgVector::avg() const
{
float val = 0.0;
@@ -94,7 +94,7 @@ float noiseVector::avg() const
return val / (float) size();
}
-bool noiseVector::insert(float val)
+bool avgVector::insert(float val)
{
if (size() < max) {
push_back(val);
@@ -109,12 +109,12 @@ bool noiseVector::insert(float val)
return true;
}
-bool noiseVector::full() const
+bool avgVector::full() const
{
return size() >= max;
}
-void noiseVector::reset()
+void avgVector::reset()
{
resize(0);
}
diff --git a/Transceiver52M/radioVector.h b/Transceiver52M/radioVector.h
index 2cb2806..8b90a63 100644
--- a/Transceiver52M/radioVector.h
+++ b/Transceiver52M/radioVector.h
@@ -48,9 +48,9 @@ private:
GSM::Time mTime;
};
-class noiseVector : std::vector<float> {
+class avgVector : std::vector<float> {
public:
- noiseVector(size_t size = 0);
+ avgVector(size_t size = 0);
bool insert(float val);
bool full() const;
float avg() const;