From ba20a4c382a46fb4d48cc44d4f81998385d0c68e Mon Sep 17 00:00:00 2001 From: Kyle Gabriel Date: Wed, 3 Apr 2019 20:46:45 -0400 Subject: [PATCH] Fix data size issue --- {src => main}/configuration.h | 0 {src => main}/credentials.h | 0 {src => main}/fonts.h | 0 {src => main}/gps.ino | 0 {src => main}/images.h | 0 {src => main}/lmic_project_config.h | 0 {src => main}/main.ino | 2 +- {src => main}/screen.ino | 0 {src => main}/sleep.ino | 0 {src => main}/ttn.ino | 4 ++-- 10 files changed, 3 insertions(+), 3 deletions(-) rename {src => main}/configuration.h (100%) rename {src => main}/credentials.h (100%) rename {src => main}/fonts.h (100%) rename {src => main}/gps.ino (100%) rename {src => main}/images.h (100%) rename {src => main}/lmic_project_config.h (100%) rename {src => main}/main.ino (98%) rename {src => main}/screen.ino (100%) rename {src => main}/sleep.ino (100%) rename {src => main}/ttn.ino (98%) diff --git a/src/configuration.h b/main/configuration.h similarity index 100% rename from src/configuration.h rename to main/configuration.h diff --git a/src/credentials.h b/main/credentials.h similarity index 100% rename from src/credentials.h rename to main/credentials.h diff --git a/src/fonts.h b/main/fonts.h similarity index 100% rename from src/fonts.h rename to main/fonts.h diff --git a/src/gps.ino b/main/gps.ino similarity index 100% rename from src/gps.ino rename to main/gps.ino diff --git a/src/images.h b/main/images.h similarity index 100% rename from src/images.h rename to main/images.h diff --git a/src/lmic_project_config.h b/main/lmic_project_config.h similarity index 100% rename from src/lmic_project_config.h rename to main/lmic_project_config.h diff --git a/src/main.ino b/main/main.ino similarity index 98% rename from src/main.ino rename to main/main.ino index 8966a96..328684b 100644 --- a/src/main.ino +++ b/main/main.ino @@ -51,7 +51,7 @@ void send() { #endif ttn_cnt(count); - ttn_send(txBuffer, LORAWAN_PORT, confirmed); + ttn_send(txBuffer, sizeof(txBuffer), LORAWAN_PORT, confirmed); count++; } diff --git a/src/screen.ino b/main/screen.ino similarity index 100% rename from src/screen.ino rename to main/screen.ino diff --git a/src/sleep.ino b/main/sleep.ino similarity index 100% rename from src/sleep.ino rename to main/sleep.ino diff --git a/src/ttn.ino b/main/ttn.ino similarity index 98% rename from src/ttn.ino rename to main/ttn.ino index 1ee3aaa..84af1de 100644 --- a/src/ttn.ino +++ b/main/ttn.ino @@ -201,7 +201,7 @@ void ttn_cnt(unsigned char num) { LMIC_setSeqnoUp(num); } -void ttn_send(uint8_t * data, uint8_t port, bool confirmed){ +void ttn_send(uint8_t * data, uint8_t data_size, uint8_t port, bool confirmed){ // Check if there is not a current TX/RX job running if (LMIC.opmode & OP_TXRXPEND) { _ttn_callback(EV_PENDING); @@ -210,7 +210,7 @@ void ttn_send(uint8_t * data, uint8_t port, bool confirmed){ // Prepare upstream data transmission at the next possible time. // Parameters are port, data, length, confirmed - LMIC_setTxData2(port, data, sizeof(data), confirmed ? 1 : 0); + LMIC_setTxData2(port, data, data_size, confirmed ? 1 : 0); _ttn_callback(EV_QUEUED); }