diff options
author | Jason Reiss <jreiss@multitech.com> | 2016-10-03 13:11:24 -0500 |
---|---|---|
committer | Jason Reiss <jreiss@multitech.com> | 2016-10-03 13:11:24 -0500 |
commit | d870873c250d27c214f49480401208e50a9cc330 (patch) | |
tree | b190f9dc88ee3a38ef3d9f4424fc0996a7b515d0 /Mode | |
parent | aa31b482b93bbbf64ca201381d12f716e695c16b (diff) | |
download | mtdot-box-evb-factory-firmware-d870873c250d27c214f49480401208e50a9cc330.tar.gz mtdot-box-evb-factory-firmware-d870873c250d27c214f49480401208e50a9cc330.tar.bz2 mtdot-box-evb-factory-firmware-d870873c250d27c214f49480401208e50a9cc330.zip |
Update to support AU915
Diffstat (limited to 'Mode')
-rw-r--r-- | Mode/ModeDemo.cpp | 5 | ||||
-rw-r--r-- | Mode/ModeGps.cpp | 2 | ||||
-rw-r--r-- | Mode/ModeJoin.cpp | 2 | ||||
-rw-r--r-- | Mode/ModeSweep.cpp | 4 |
4 files changed, 7 insertions, 6 deletions
diff --git a/Mode/ModeDemo.cpp b/Mode/ModeDemo.cpp index 4add135..f32e03c 100644 --- a/Mode/ModeDemo.cpp +++ b/Mode/ModeDemo.cpp @@ -41,7 +41,7 @@ bool ModeDemo::start() { _initial_data_rate = _dot->getTxDataRate(); // use configured data rate and power if possible - if (_band == mDot::FB_915 && _initial_data_rate == mDot::DR0) { + if ((_band == mDot::FB_US915 || _band == mDot::FB_AU915) && _initial_data_rate == mDot::DR0) { logInfo("using DR1 instead of DR0 - DR0 max packet size is too small for data"); _dot->setTxDataRate(mDot::DR1); } @@ -103,8 +103,9 @@ bool ModeDemo::start() { case ButtonHandler::sw1_hold: _send_timer.stop(); _send_timer.reset(); - if (_band == mDot::FB_915) + if (_band == mDot::FB_US915 || _band == mDot::FB_AU915) { _dot->setTxDataRate(_initial_data_rate); + } return true; } } diff --git a/Mode/ModeGps.cpp b/Mode/ModeGps.cpp index 47053cb..58b2b1f 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_915 || _data_rate > mDot::DR5) { + if ((_data_rate > mDot::DR3 && (_band == mDot::FB_US915 || _band == mDot::FB_AU915)) || _data_rate > mDot::DR5) { _drAll = true; _data_rate = 0; } diff --git a/Mode/ModeJoin.cpp b/Mode/ModeJoin.cpp index 3a86dd9..62ac25d 100644 --- a/Mode/ModeJoin.cpp +++ b/Mode/ModeJoin.cpp @@ -119,7 +119,7 @@ void ModeJoin::display() { _join.updateId(_dot->getNetworkName()); _join.updateKey(_dot->getNetworkPassphrase()); } - if (_band == mDot::FB_915) { + if (_band == mDot::FB_US915 || _band == mDot::FB_AU915) { _sub_band = _dot->getFrequencySubBand(); _join.updateFsb(_sub_band); } diff --git a/Mode/ModeSweep.cpp b/Mode/ModeSweep.cpp index b6bef24..c6de7ba 100644 --- a/Mode/ModeSweep.cpp +++ b/Mode/ModeSweep.cpp @@ -261,7 +261,7 @@ bool ModeSweep::start() { } // wait 5s in EU mode to compensate for potential "no free channel" situations on server - if ((_band == mDot::FB_915 && _display_timer.read_ms() > 2000) || _display_timer.read_ms() > 5000) { + if ((_band != mDot::FB_EU868 && _display_timer.read_ms() > 2000) || _display_timer.read_ms() > 5000) { _display_timer.stop(); _display_timer.reset(); if (_survey_current == _survey_total) { @@ -380,7 +380,7 @@ std::vector<point> ModeSweep::generatePoints() { } uint8_t ModeSweep::payloadToRate(uint8_t payload) { - if (_band == mDot::FB_915) { + if (_band != mDot::FB_EU868) { if (payload <= mDot::MaxLengths_915[mDot::DR0]) return mDot::DR0; else if (payload <= mDot::MaxLengths_915[mDot::DR1]) |