mirror of
https://github.com/meshtastic/firmware.git
synced 2025-06-16 10:02:05 +00:00
Merge pull request #113 from geeksville/master
Make new (optional) serial protobuf API work
This commit is contained in:
commit
6a54bbcf2a
1
.gitignore
vendored
1
.gitignore
vendored
@ -6,6 +6,5 @@ main/credentials.h
|
||||
.vscode/*
|
||||
!.vscode/settings.json
|
||||
!.vscode/tasks.json
|
||||
!.vscode/launch.json
|
||||
!.vscode/extensions.json
|
||||
*.code-workspace
|
@ -1,3 +1,3 @@
|
||||
|
||||
|
||||
export VERSION=0.5.5
|
||||
export VERSION=0.6.0
|
@ -46,11 +46,11 @@ Note: Updates are happening almost daily, only major updates are listed below. F
|
||||
|
||||
## Meshtastic Android app
|
||||
|
||||
Once out of alpha the companion Android application will be released here:
|
||||
Our Android application is available here:
|
||||
|
||||
[](https://play.google.com/store/apps/details?id=com.geeksville.mesh&referrer=utm_source%3Dhomepage%26anid%3Dadmob)
|
||||
|
||||
But if you want the bleeding edge app now, we'd love to have your help testing. Three steps to opt-in to the alpha- test:
|
||||
The link above will return older more stable releases. We would prefer if you join our alpha-test group, because the application is rapidly improving. Three steps to opt-in to the alpha- test:
|
||||
|
||||
1. Join [this Google group](https://groups.google.com/forum/#!forum/meshtastic-alpha-testers) with the account you use in Google Play.
|
||||
2. Go to this [URL](https://play.google.com/apps/testing/com.geeksville.mesh) to opt-in to the alpha test.
|
||||
|
2
proto
2
proto
@ -1 +1 @@
|
||||
Subproject commit 79b2cf728c08007284542b32d9d075d01e8153d8
|
||||
Subproject commit 8427b23016dc96fc78885f05de5172e9eec5fe6d
|
@ -9,7 +9,7 @@ SerialConsole console;
|
||||
SerialConsole::SerialConsole() : StreamAPI(&Port), RedirectablePrint(&Port)
|
||||
{
|
||||
canWrite = false; // We don't send packets to our port until it has talked to us first
|
||||
// setDestination(&noopPrint);
|
||||
// setDestination(&noopPrint); for testing, try turning off 'all' debug output and see what leaks
|
||||
}
|
||||
|
||||
/// Do late init that can't happen at constructor time
|
||||
@ -25,7 +25,11 @@ void SerialConsole::init()
|
||||
*/
|
||||
void SerialConsole::handleToRadio(const uint8_t *buf, size_t len)
|
||||
{
|
||||
setDestination(&noopPrint);
|
||||
// Note: for the time being we could _allow_ debug printing to keep going out the console
|
||||
// I _think_ this is okay because we currently only print debug msgs from loop() and we are only
|
||||
// dispatching serial protobuf msgs from loop() as well. When things are more threaded in the future this
|
||||
// will need to change.
|
||||
// setDestination(&noopPrint);
|
||||
canWrite = true;
|
||||
|
||||
StreamAPI::handleToRadio(buf, len);
|
||||
|
@ -39,9 +39,10 @@ void StreamAPI::readStream()
|
||||
rxPtr = 0; // length is bogus, restart search for framing
|
||||
}
|
||||
|
||||
if (rxPtr != 0 && ptr == len + HEADER_LEN) {
|
||||
if (rxPtr != 0 && ptr + 1 == len + HEADER_LEN) {
|
||||
// If we didn't just fail the packet and we now have the right # of bytes, parse it
|
||||
handleToRadio(rxBuf + HEADER_LEN, len);
|
||||
rxPtr = 0; // start over again
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ typedef enum _Constants {
|
||||
} Constants;
|
||||
|
||||
typedef enum _Data_Type {
|
||||
Data_Type_SIGNAL_OPAQUE = 0,
|
||||
Data_Type_OPAQUE = 0,
|
||||
Data_Type_CLEAR_TEXT = 1,
|
||||
Data_Type_CLEAR_READACK = 2
|
||||
} Data_Type;
|
||||
@ -178,7 +178,7 @@ typedef struct _ToRadio {
|
||||
#define _Constants_MAX Constants_Unused
|
||||
#define _Constants_ARRAYSIZE ((Constants)(Constants_Unused+1))
|
||||
|
||||
#define _Data_Type_MIN Data_Type_SIGNAL_OPAQUE
|
||||
#define _Data_Type_MIN Data_Type_OPAQUE
|
||||
#define _Data_Type_MAX Data_Type_CLEAR_READACK
|
||||
#define _Data_Type_ARRAYSIZE ((Data_Type)(Data_Type_CLEAR_READACK+1))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user