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); }