This commit is contained in:
2025-04-30 15:44:35 +02:00
parent 5ea05fa209
commit c26e5e012c

View File

@@ -143,7 +143,6 @@ static void build_and_send_ack(uint32_t ackIndex, uint32_t crc32Checksum, uint64
{
uint8_t bufOut[256] = {0};
ACKPacket ackPacket = {
.packetIndex = ackIndex,
.crc32Checksum = crc32Checksum,
@@ -199,7 +198,8 @@ void process_uplink_packet(uint8_t *data, uint8_t len, uint64_t missionTimer)
uint32_t crc = esp_rom_crc32_le(0, payload, payloadRXLen);
if (crc != uplinkPacket.CRCCheck) {
if (crc != uplinkPacket.CRCCheck)
{
ESP_LOGE(TAG, "Received BAD CRC for packet %ld, crc is %ld, should be %ld", uplinkPacket.packetIndex, crc, uplinkPacket.CRCCheck);
return;
}
@@ -285,10 +285,6 @@ void lora_receive_task(void *pvParameters)
void lora_comms_task(void *pvParameters)
{
ESP_LOGI(TAG, "lora_comms_task started");
// while (foundDevices[0] != 2) {
// vTaskDelay(10);
// }
@@ -297,7 +293,9 @@ void lora_comms_task(void *pvParameters)
loraRadioMutex = xSemaphoreCreateMutex();
xSemaphoreGive(loraRadioMutex); // Set semaphore as available
ESP_LOGI(TAG, "lora_comms_task started");
setup_lora();
ESP_LOGI(TAG, "lora_comms_task continuing");
xTaskCreate(
lora_receive_task,
"LoraReceiveTask",
@@ -305,10 +303,12 @@ void lora_comms_task(void *pvParameters)
NULL,
(tskIDLE_PRIORITY + 2),
NULL);
ESP_LOGI(TAG, "loraInit");
while (1)
{
int64_t start_time = esp_timer_get_time();
ESP_LOGI(TAG, "fdfgtfet");
if (packetReadiness)
{
ESP_LOGI(TAG, "Preparing telemetry");