Skip to content

Commit

Permalink
Merge pull request #385 from cyberman54/development
Browse files Browse the repository at this point in the history
v1.7.7
  • Loading branch information
cyberman54 authored Jun 29, 2019
2 parents 833cd42 + 2c08294 commit ccb0be2
Show file tree
Hide file tree
Showing 3 changed files with 100 additions and 336 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ By default bluetooth sniffing is disabled (#define *BLECOUNTER* 0 in paxcounter.

Before compiling the code,

- **edit platformio.ini** and select desired hardware target in section boards. To add a new board, create an appropriate hardware abstraction layer file in hal subdirectory, and add a pointer to this file in sections boards.

- **edit src/paxcounter.conf** and tailor settings in this file according to your needs and use case. Please take care of the duty cycle regulations of the LoRaWAN network you're going to use.

- **edit src/lmic_config.h** and tailor settings in this file according to your country and device hardware. Please take care of national regulations when selecting the frequency band for LoRaWAN.
Expand Down
15 changes: 13 additions & 2 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,17 @@
# get platformio source path
srcdir = env.get("PROJECTSRC_DIR")

# get hal path
haldir = os.path.join (srcdir, "hal")

# check if hal file is present in source directory
halconfig = config.get("board", "halfile")
halconfigfile = os.path.join (haldir, halconfig)
if os.path.isfile(halconfigfile) and os.access(halconfigfile, os.R_OK):
print "Parsing hardware configuration from " + halconfigfile
else:
sys.exit("Missing file " + halconfigfile + ", please create it! Aborting.")

# check if lmic config file is present in source directory
lmicconfig = config.get("common", "lmicconfigfile")
lmicconfigfile = os.path.join (srcdir, lmicconfig)
Expand Down Expand Up @@ -58,7 +69,7 @@

# get bintray upload parameters from platformio environment
version = config.get("common", "release_version")
package = str(env.get("PIOENV"))
package, dummy = halconfig.partition(".")[::2]

# put bintray user credentials to platformio environment
env.Replace(BINTRAY_USER=user)
Expand All @@ -71,7 +82,7 @@
u'-DWIFI_PASS=\\"' + mykeys["OTA_WIFI_PASS"] + '\\"',
u'-DBINTRAY_USER=\\"' + mykeys["BINTRAY_USER"] + '\\"',
u'-DBINTRAY_REPO=\\"' + mykeys["BINTRAY_REPO"] + '\\"',
u'-DBINTRAY_PACKAGE=\\"$PIOENV\\"',
u'-DBINTRAY_PACKAGE=\\"' + package + '\\"',
u'-DARDUINO_LMIC_PROJECT_CONFIG_H=' + lmicconfig,
u'-I \"' + srcdir + '\"'
])
Expand Down
Loading

0 comments on commit ccb0be2

Please sign in to comment.