From 747c30c39e5147198841420e7c5149a61982d034 Mon Sep 17 00:00:00 2001 From: Leon Lindenfelser Date: Mon, 17 Oct 2016 10:24:10 -0500 Subject: 1. Display DOT-BOX/EVB AU915/US915/EU868 on start up and main menu screens. 2. Add check for SF_10 in demo mode. Diplay message and change to SF_9 so packet size is large enough for all data. 3. Update setup.sh to pull in libs with enable/disable irq removed for mbed 5. --- Layout/LayoutStartup.cpp | 6 +++--- Mode/ModeDemo.cpp | 12 +++++++++--- main.cpp | 4 ++-- setup.sh | 8 ++++---- 4 files changed, 18 insertions(+), 12 deletions(-) diff --git a/Layout/LayoutStartup.cpp b/Layout/LayoutStartup.cpp index 4603308..bf591d5 100644 --- a/Layout/LayoutStartup.cpp +++ b/Layout/LayoutStartup.cpp @@ -24,10 +24,10 @@ LayoutStartup::LayoutStartup(DOGS102* lcd, mDot* dot) : Layout(lcd), _dot(dot), - _lName(0, 3, "MTDOT-BOX/EVB"), + _lName(0, 3, "DOT-BOX/EVB"), _lInfo(0, 4, "Factory Firmware"), _lVersion(0, 5, "Version"), - _fName(14, 3, 3), + _fName(12, 3, 5), _fVersion(8, 5, 9), _fId(0, 7, 17), _fGps(0, 6, 17), @@ -47,7 +47,7 @@ void LayoutStartup::display() { writeLabel(_lName); writeLabel(_lInfo); writeLabel(_lVersion); - writeField(_fName, mDot::FrequencyBandStr(_dot->getFrequencyBand()).substr(3)); + writeField(_fName, mDot::FrequencyBandStr(_dot->getFrequencyBand())); writeField(_fVersion, version); writeField(_fId, id); diff --git a/Mode/ModeDemo.cpp b/Mode/ModeDemo.cpp index f32e03c..cdabe32 100644 --- a/Mode/ModeDemo.cpp +++ b/Mode/ModeDemo.cpp @@ -41,9 +41,15 @@ bool ModeDemo::start() { _initial_data_rate = _dot->getTxDataRate(); // use configured data rate and power if possible - 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); + 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; diff --git a/main.cpp b/main.cpp index 71ac376..fdbd3e2 100644 --- a/main.cpp +++ b/main.cpp @@ -178,8 +178,8 @@ void mainMenu() { items.push_back(menu_strings[data]); while (true) { - product = "MTDOT-BOX/EVB "; - product += mDot::FrequencyBandStr(dot->getFrequencyBand()).substr(3); + product = "DOT-BOX/EVB "; + product += mDot::FrequencyBandStr(dot->getFrequencyBand()); // reset session between modes dot->resetNetworkSession(); diff --git a/setup.sh b/setup.sh index d21538b..9bd8c46 100755 --- a/setup.sh +++ b/setup.sh @@ -31,12 +31,12 @@ mdot-library/version.sh echo "creating libs directory..." mkdir -p $LIB -update_hg_lib "ISL29011" 3 -update_hg_lib "MMA845x" 3 -update_hg_lib "MPL3115A2" 2 +update_hg_lib "ISL29011" 4 +update_hg_lib "MMA845x" 4 +update_hg_lib "MPL3115A2" 3 update_hg_lib "NCP5623B" 3 update_hg_lib "GpsParser" 10 -update_hg_lib "DOGS102" 4 +update_hg_lib "DOGS102" 5 echo "generating version header..." cd $DIR -- cgit v1.2.3 From 51af846aa838efac7a6bf46d001b43b5e1c446c8 Mon Sep 17 00:00:00 2001 From: Leon Lindenfelser Date: Mon, 17 Oct 2016 10:34:33 -0500 Subject: 1. Move 'else' for code readability consistency. 2. Add forgotten NCP5623B version update to setup.sh. --- Mode/ModeDemo.cpp | 3 +-- setup.sh | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Mode/ModeDemo.cpp b/Mode/ModeDemo.cpp index cdabe32..9935b7b 100644 --- a/Mode/ModeDemo.cpp +++ b/Mode/ModeDemo.cpp @@ -45,8 +45,7 @@ bool ModeDemo::start() { 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{ + }else{ logInfo("using SF_9 instead of SF_10 - SF_10 max packet size is too small for data"); _dot->setTxDataRate(mDot::SF_9); } diff --git a/setup.sh b/setup.sh index 9bd8c46..52717d4 100755 --- a/setup.sh +++ b/setup.sh @@ -34,7 +34,7 @@ mkdir -p $LIB update_hg_lib "ISL29011" 4 update_hg_lib "MMA845x" 4 update_hg_lib "MPL3115A2" 3 -update_hg_lib "NCP5623B" 3 +update_hg_lib "NCP5623B" 4 update_hg_lib "GpsParser" 10 update_hg_lib "DOGS102" 5 -- cgit v1.2.3