summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Reiss <jreiss@multitech.com>2016-10-03 13:50:34 -0500
committerJason Reiss <jreiss@multitech.com>2016-10-03 13:50:34 -0500
commitcaf1d23ac7bd0e771f20829b29e3af3adb2a223d (patch)
tree51ab4615705c25bc24a4e0145a7e279d66acb028
parentd870873c250d27c214f49480401208e50a9cc330 (diff)
downloadmtdot-box-evb-factory-firmware-caf1d23ac7bd0e771f20829b29e3af3adb2a223d.tar.gz
mtdot-box-evb-factory-firmware-caf1d23ac7bd0e771f20829b29e3af3adb2a223d.tar.bz2
mtdot-box-evb-factory-firmware-caf1d23ac7bd0e771f20829b29e3af3adb2a223d.zip
set AU/US max at DR4 and EU max at DR6
-rw-r--r--Mode/ModeGps.cpp2
-rw-r--r--Mode/ModeSingle.cpp2
-rw-r--r--Mode/ModeSweep.cpp16
3 files changed, 10 insertions, 10 deletions
diff --git a/Mode/ModeGps.cpp b/Mode/ModeGps.cpp
index 58b2b1f..98ecb54 100644
--- a/Mode/ModeGps.cpp
+++ b/Mode/ModeGps.cpp
@@ -67,7 +67,7 @@ void ModeGps::init(){
void ModeGps::drIncrement(){
_data_rate++;
- if ((_data_rate > mDot::DR3 && (_band == mDot::FB_US915 || _band == mDot::FB_AU915)) || _data_rate > mDot::DR5) {
+ if ((_data_rate > mDot::DR4 && (_band == mDot::FB_US915 || _band == mDot::FB_AU915)) || _data_rate > mDot::DR6) {
_drAll = true;
_data_rate = 0;
}
diff --git a/Mode/ModeSingle.cpp b/Mode/ModeSingle.cpp
index 6cc3f4b..b95a6ea 100644
--- a/Mode/ModeSingle.cpp
+++ b/Mode/ModeSingle.cpp
@@ -326,7 +326,7 @@ void ModeSingle::incrementRatePower() {
_data_rate++;
if ((_band == mDot::FB_US915 && _data_rate > mDot::DR4) ||
(_band == mDot::FB_AU915 && _data_rate > mDot::DR4) ||
- (_band == mDot::FB_EU868 && _data_rate > mDot::DR7)) {
+ (_band == mDot::FB_EU868 && _data_rate > mDot::DR6)) {
_data_rate = mDot::DR0;
}
} else {
diff --git a/Mode/ModeSweep.cpp b/Mode/ModeSweep.cpp
index c6de7ba..b5a2b15 100644
--- a/Mode/ModeSweep.cpp
+++ b/Mode/ModeSweep.cpp
@@ -380,7 +380,14 @@ std::vector<point> ModeSweep::generatePoints() {
}
uint8_t ModeSweep::payloadToRate(uint8_t payload) {
- if (_band != mDot::FB_EU868) {
+ if (_band == mDot::FB_EU868) {
+ if (payload <= mDot::MaxLengths_868[mDot::DR0])
+ return mDot::DR0;
+ else if (payload <= mDot::MaxLengths_868[mDot::DR3])
+ return mDot::DR3;
+ else
+ return mDot::DR6;
+ } else {
if (payload <= mDot::MaxLengths_915[mDot::DR0])
return mDot::DR0;
else if (payload <= mDot::MaxLengths_915[mDot::DR1])
@@ -389,13 +396,6 @@ uint8_t ModeSweep::payloadToRate(uint8_t payload) {
return mDot::DR2;
else
return mDot::DR4;
- } else {
- if (payload <= mDot::MaxLengths_868[mDot::DR0])
- return mDot::DR0;
- else if (payload <= mDot::MaxLengths_868[mDot::DR3])
- return mDot::DR3;
- else
- return mDot::DR6;
}
}