-
Notifications
You must be signed in to change notification settings - Fork 676
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from meshtastic/master
merge from original repository
- Loading branch information
Showing
112 changed files
with
3,334 additions
and
2,937 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,5 +17,5 @@ Thumbs.db | |
.cproject | ||
.idea/* | ||
.vagrant | ||
|
||
nanopb* | ||
flash.uf2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/usr/bin/env python3 | ||
import configparser | ||
|
||
config = configparser.RawConfigParser() | ||
config.read('version.properties') | ||
|
||
version = dict(config.items('VERSION')) | ||
|
||
verStr = "{}.{}.{}".format(version["major"], version["minor"], version["build"]) | ||
|
||
print(f"{verStr}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
|
||
Import("projenv") | ||
|
||
import configparser | ||
prefsLoc = projenv["PROJECT_DIR"] + "/version.properties" | ||
config = configparser.RawConfigParser() | ||
config.read(prefsLoc) | ||
version = dict(config.items('VERSION')) | ||
verStr = "{}.{}.{}".format(version["major"], version["minor"], version["build"]) | ||
|
||
print(f"Using meshtastic platform-custom.py, firmare version {verStr}") | ||
|
||
# General options that are passed to the C and C++ compilers | ||
projenv.Append(CCFLAGS=[ | ||
f"-DAPP_VERSION={verStr}" | ||
]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
|
||
set -e | ||
|
||
source bin/version.sh | ||
VERSION=`bin/buildinfo.py` | ||
|
||
esptool.py --baud 921600 write_flash 0x10000 release/latest/bins/firmware-tbeam-US-$VERSION.bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
set -e | ||
|
||
source bin/version.sh | ||
|
||
esptool.py --baud 921600 write_flash 0x10000 release/latest/bins/universal/firmware-tbeam-$VERSION.bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,15 @@ | ||
#!/bin/bash | ||
|
||
echo "This script requires https://jpa.kapsi.fi/nanopb/download/ version 0.4.1" | ||
set -e | ||
|
||
echo "This script requires https://jpa.kapsi.fi/nanopb/download/ version 0.4.4 to be located in the" | ||
echo "meshtastic-device root directory if the following step fails, you should download the correct" | ||
echo "prebuilt binaries for your computer into nanopb-0.4.4" | ||
|
||
# the nanopb tool seems to require that the .options file be in the current directory! | ||
cd proto | ||
../../nanopb-0.4.1-linux-x86/generator-bin/protoc --nanopb_out=-v:../src/mesh -I=../proto mesh.proto | ||
../nanopb-0.4.4/generator-bin/protoc --nanopb_out=-v:../src/mesh -I=../proto *.proto | ||
|
||
echo "Regenerating protobuf documentation - if you see an error message" | ||
echo "you can ignore it unless doing a new protobuf release to github." | ||
bin/regen-docs.sh |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
var meshtasticClient; | ||
var connectionOne; | ||
|
||
|
||
// Important: the connect action must be called from a user interaction (e.g. button press), otherwise the browsers won't allow the connect | ||
function connect() { | ||
|
||
// Create new connection | ||
var httpconn = new meshtasticjs.IHTTPConnection(); | ||
|
||
// Set connection params | ||
let sslActive; | ||
if (window.location.protocol === 'https:') { | ||
sslActive = true; | ||
} else { | ||
sslActive = false; | ||
} | ||
let deviceIp = window.location.hostname; // Your devices IP here | ||
|
||
|
||
// Add event listeners that get called when a new packet is received / state of device changes | ||
httpconn.addEventListener('fromRadio', function (packet) { console.log(packet) }); | ||
|
||
// Connect to the device async, then send a text message | ||
httpconn.connect(deviceIp, sslActive) | ||
.then(result => { | ||
|
||
alert('device has been configured') | ||
// This gets called when the connection has been established | ||
// -> send a message over the mesh network. If no recipient node is provided, it gets sent as a broadcast | ||
return httpconn.sendText('meshtastic is awesome'); | ||
|
||
}) | ||
.then(result => { | ||
|
||
// This gets called when the message has been sucessfully sent | ||
console.log('Message sent!'); | ||
}) | ||
|
||
.catch(error => { console.log(error); }); | ||
|
||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<!doctype html> | ||
<html class="no-js" lang=""> | ||
|
||
<head> | ||
<meta charset="utf-8"> | ||
<title></title> | ||
|
||
<script src="/static/meshtastic.js"></script> | ||
<script src="/static/basic.js"></script> | ||
</head> | ||
|
||
<body> | ||
|
||
<button id="connect_button" onclick="connect()">Connect to Meshtastic device</button> | ||
|
||
</body> | ||
|
||
</html> |
Binary file not shown.
Oops, something went wrong.