Merge pull request #284 from cyberman54/master

sync
This commit is contained in:
Verkehrsrot 2019-03-02 13:38:00 +01:00 committed by GitHub
commit b4010d2b7b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 5 deletions

View File

@ -1,7 +1,7 @@
# ESP32-Paxcounter # ESP32-Paxcounter
**Wifi & Bluetooth driven, LoRaWAN enabled, battery powered mini Paxcounter built on cheap ESP32 LoRa IoT boards** **Wifi & Bluetooth driven, LoRaWAN enabled, battery powered mini Paxcounter built on cheap ESP32 LoRa IoT boards**
--> see development branch of this repository for latest alpha version <-- Tutorial (in german language): https://www.heise.de/select/make/2019/1/1551099236518668
<img src="img/Paxcounter-title.jpg"> <img src="img/Paxcounter-title.jpg">
<img src="img/Paxcounter-ttgo.jpg"> <img src="img/Paxcounter-ttgo.jpg">
@ -396,3 +396,4 @@ Thanks to
- [Charles Hallard](https://github.com/hallard) for major code contributions to this project - [Charles Hallard](https://github.com/hallard) for major code contributions to this project
- [robbi5](https://github.com/robbi5) for the payload converter - [robbi5](https://github.com/robbi5) for the payload converter
- [terrillmoore](https://github.com/mcci-catena) for maintaining the LMIC for arduino LoRaWAN stack - [terrillmoore](https://github.com/mcci-catena) for maintaining the LMIC for arduino LoRaWAN stack
- [sbamueller](https://github.com/sbamueller) for writing the tutorial in Make Magazine

View File

@ -10,7 +10,7 @@ function Decoder(bytes, port) {
if (bytes.length >= 2) { if (bytes.length >= 2) {
decoded.wifi = (bytes[i++] << 8) | bytes[i++];} decoded.wifi = (bytes[i++] << 8) | bytes[i++];}
if (bytes.length >= 4) { if (bytes.length === 4 || bytes.length > 15) {
decoded.ble = (bytes[i++] << 8) | bytes[i++];} decoded.ble = (bytes[i++] << 8) | bytes[i++];}
if (bytes.length > 4) { if (bytes.length > 4) {
@ -61,6 +61,12 @@ function Decoder(bytes, port) {
decoded.air = ((bytes[i++] << 8) | bytes[i++]); decoded.air = ((bytes[i++] << 8) | bytes[i++]);
} }
if (port === 8) {
var i = 0;
if (bytes.length >= 2) {
decoded.battery = (bytes[i++] << 8) | bytes[i++];}
}
return decoded; return decoded;
} }

View File

@ -23,7 +23,7 @@
// GPS settings // GPS settings
#define HAS_GPS 1 // use on board GPS #define HAS_GPS 1 // use on board GPS
#define GPS_SERIAL 9600, SERIAL_8N1, GPIO_NUM_12, GPIO_NUM_15 // UBlox NEO 6M #define GPS_SERIAL 9600, SERIAL_8N1, GPIO_NUM_12, GPIO_NUM_15 // UBlox NEO 6M
#define GPS_INT GPIO_NUM_34 // 30ns accurary timepulse, to be external wired on pcb: NEO 6M Pin#3 -> GPIO34 //#define GPS_INT GPIO_NUM_34 // 30ns accurary timepulse, to be external wired on pcb: NEO 6M Pin#3 -> GPIO34
// Settings for on board DS3231 RTC chip // Settings for on board DS3231 RTC chip
//#define HAS_RTC MY_OLED_SDA, MY_OLED_SCL // SDA, SCL //#define HAS_RTC MY_OLED_SDA, MY_OLED_SCL // SDA, SCL