|
|
@ -114,7 +114,7 @@ void loraTask(void *params) { |
|
|
|
char tx_buf[20]; |
|
|
|
char tx_buf[20]; |
|
|
|
const size_t tx_buf_len = (sizeof(tx_buf) / sizeof(tx_buf[0])); |
|
|
|
const size_t tx_buf_len = (sizeof(tx_buf) / sizeof(tx_buf[0])); |
|
|
|
int packet_len; |
|
|
|
int packet_len; |
|
|
|
TickType_t send_period = pdMS_TO_TICKS(2000); |
|
|
|
TickType_t send_period = pdMS_TO_TICKS(1000); |
|
|
|
TickType_t current_time = xTaskGetTickCount(); |
|
|
|
TickType_t current_time = xTaskGetTickCount(); |
|
|
|
TickType_t next_send = current_time + send_period; |
|
|
|
TickType_t next_send = current_time + send_period; |
|
|
|
struct Packet recvd_packet; |
|
|
|
struct Packet recvd_packet; |
|
|
@ -144,7 +144,7 @@ void loraTask(void *params) { |
|
|
|
if (ret != ESP_OK) { |
|
|
|
if (ret != ESP_OK) { |
|
|
|
ESP_LOGE(TAG, "error sending packet: %d", ret); |
|
|
|
ESP_LOGE(TAG, "error sending packet: %d", ret); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
ESP_LOGI(TAG, "lora wrote %d bytes\n", written_bytes); |
|
|
|
ESP_LOGI(TAG, "lora wrote %d bytes", written_bytes); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
current_time = xTaskGetTickCount(); |
|
|
|
current_time = xTaskGetTickCount(); |
|
|
|