Fix data size issue

This commit is contained in:
Kyle Gabriel committed 2019-04-03 20:46:45 -04:00
1 parent dd105959c4
commit ba20a4c382
10 files changed
+3 -3

No files matched your search

File renamed without changes.
File renamed without changes.
View File
File renamed without changes.
View File
File renamed without changes.
View File
File renamed without changes.
File renamed without changes.
+1 -1
View File
@@ -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++;
}
View File
File renamed without changes.
View File
File renamed without changes.
+2 -2
View File
@@ -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);
}