Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: DOGS102 GpsParser ISL29011 MMA845x MPL3115A2 MTS-Serial NCP5623B libmDot-dev-mbed5-deprecated
Fork of MTDOT-BOX-EVB-Factory-Firmware by
Diff: Mode/ModeDemo.cpp
- Revision:
- 7:a31236c2e75c
- Parent:
- 1:71125aa00e33
diff -r cc61867b45ce -r a31236c2e75c Mode/ModeDemo.cpp --- a/Mode/ModeDemo.cpp Fri Nov 04 22:21:01 2016 +0000 +++ b/Mode/ModeDemo.cpp Fri Nov 04 17:27:05 2016 -0500 @@ -41,9 +41,14 @@ _initial_data_rate = _dot->getTxDataRate(); // use configured data rate and power if possible - if (_band == mDot::FB_915 && _initial_data_rate == mDot::SF_10) { - logInfo("using SF_9 instead of SF_10 - SF_10 max packet size is too small for data"); - _dot->setTxDataRate(mDot::SF_9); + if ((_band == mDot::FB_US915 || _band == mDot::FB_AU915) && (_initial_data_rate == mDot::DR0 || _initial_data_rate == mDot::SF_10)) { + if(_initial_data_rate == mDot::DR0){ + logInfo("using DR1 instead of DR0 - DR0 max packet size is too small for data"); + _dot->setTxDataRate(mDot::DR1); + }else{ + logInfo("using SF_9 instead of SF_10 - SF_10 max packet size is too small for data"); + _dot->setTxDataRate(mDot::SF_9); + } } _state = show_help; @@ -103,8 +108,9 @@ 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; } }