From 5e0c56267ea406b69b47cfb420e81a518c995aad Mon Sep 17 00:00:00 2001 From: "Hansi, dl9rdz" Date: Mon, 29 Apr 2019 00:17:05 +0200 Subject: [PATCH] v0.5d: merging minor things: - more debug message for wifi (for mode wifi=3) - testing travis ci --- .travis/push.sh | 10 +++++----- RX_FSK/RX_FSK.ino | 16 ++++++++++++++-- RX_FSK/version.h | 2 +- 3 files changed, 20 insertions(+), 8 deletions(-) diff --git a/.travis/push.sh b/.travis/push.sh index bbed07b..587be67 100755 --- a/.travis/push.sh +++ b/.travis/push.sh @@ -21,21 +21,21 @@ generate_website_index() { git commit --message "Travis build: $TRAVIS_BUILD_NUMBER" } commit_website_files() { - BRANCH=`git status | head -1 | awk '{print $NF}'` + BRANCH=$TRAVIS_BRANCH VERSION=`cat RX_FSK/version.h | tail -1 | egrep -o '".*"' | sed 's/"//g' | sed 's/ /_/g'` + MYPATH=$PWD echo "On branch $BRANCH" echo "Version $VERSION" cd /tmp git clone https://github.com/dl9rdz/rdz_ttgo_sonde.git -b gh-pages cd rdz_ttgo_sonde - cp ~/out.bin ${BRANCH}/${VERSION}-full.bin + cp ${MYPATH}/out.bin ${BRANCH}/${VERSION}-full.bin git add ${BRANCH}/${VERSION}-full.bin # git commit --message "Travis build: $TRAVIS_BUILD_NUMBER" } upload_files() { - #git remote add origin-pages https://${GH_TOKEN}@github.com/MVSE-outreach/resources.git > /dev/null 2>&1 - #git push --quiet --set-upstream origin-pages gh-pages - git push --quiet + git remote add origin-pages https://${GITHUB_API_KEY}@github.com/dl9rdz/rdz_ttgo_sonde.git > /dev/null 2>&1 + git push --quiet --set-upstream origin-pages gh-pages } setup_git commit_website_files diff --git a/RX_FSK/RX_FSK.ino b/RX_FSK/RX_FSK.ino index 8d87fcb..bf7b855 100644 --- a/RX_FSK/RX_FSK.ino +++ b/RX_FSK/RX_FSK.ino @@ -434,7 +434,18 @@ void SetupAsyncServer() { int fetchWifiIndex(const char *id) { for (int i = 0; i < nNetworks; i++) { - if (strcmp(id, networks[i].id.c_str()) == 0) return i; + if (strcmp(id, networks[i].id.c_str()) == 0) { + Serial.printf("Match for %s at %d\n", id, i); + return i; + } + Serial.printf("No match: '%s' vs '%s'\n", id, networks[i].id.c_str()); + const char *cfgid = networks[i].id.c_str(); + int len=strlen(cfgid); + if(strlen(id)>len) len=strlen(id); + Serial.print("SSID: "); + for(int i = 0; i < len; i++) { Serial.printf("%02x ", id[i]); } Serial.println(""); + Serial.print("Conf: "); + for(int i = 0; i < len; i++) { Serial.printf("%02x ", cfgid[i]); } Serial.println(""); } return -1; } @@ -1049,7 +1060,8 @@ void loopWifiScan() { int curidx = fetchWifiIndex(id); if (curidx >= 0 && index == -1) { index = curidx; - } + Serial.printf("Match found at scan entry %d, config network %d\n", i, index); + } } if (index >= 0) { // some network was found Serial.print("Connecting to: "); Serial.println(fetchWifiSSID(index)); diff --git a/RX_FSK/version.h b/RX_FSK/version.h index 4c2e7fb..7432703 100644 --- a/RX_FSK/version.h +++ b/RX_FSK/version.h @@ -1,2 +1,2 @@ const char *version_name = "RDZ_TTGO_SONDE"; -const char *version_id = "master v0.5c"; +const char *version_id = "master v0.5d";