disable sensor detection - temporary solution

This commit is contained in:
2025-04-28 21:00:16 +02:00
parent 8b9e72ef71
commit 5ea05fa209
6 changed files with 95 additions and 107 deletions

View File

@@ -191,7 +191,7 @@ void process_uplink_packet(uint8_t *data, uint8_t len, uint64_t missionTimer)
return;
}
ESP_LOGI(TAG, "Got uplink packet of type %d, index %d", uplinkPacket.packetType, uplinkPacket.packetIndex);
ESP_LOGI(TAG, "Got uplink packet of type %d, index %ld", uplinkPacket.packetType, uplinkPacket.packetIndex);
uint8_t *payload = data + sizeof(UplinkPacket);
@@ -200,13 +200,13 @@ 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) {
ESP_LOGE(TAG, "Received BAD CRC for packet %d, crc is %ld, should be %ld", uplinkPacket.packetIndex, crc, uplinkPacket.CRCCheck);
ESP_LOGE(TAG, "Received BAD CRC for packet %ld, crc is %ld, should be %ld", uplinkPacket.packetIndex, crc, uplinkPacket.CRCCheck);
return;
}
if (uplinkPacket.packetType == UplinkPacketType_ACK)
{
ESP_LOGI(TAG, "Received ACK for packet %d", uplinkPacket.packetIndex);
ESP_LOGI(TAG, "Received ACK for packet %ld", uplinkPacket.packetIndex);
ackReceived = true;
lastAckIndex = uplinkPacket.packetIndex;
return;
@@ -247,12 +247,12 @@ void process_uplink_packet(uint8_t *data, uint8_t len, uint64_t missionTimer)
}
else if (uplinkPacket.packetIndex > packetIndexRX + 1)
{
ESP_LOGW(TAG, "Skipped %d packets", uplinkPacket.packetIndex - (packetIndexRX + 1));
ESP_LOGW(TAG, "Skipped %ld packets", uplinkPacket.packetIndex - (packetIndexRX + 1));
packetIndexRX = uplinkPacket.packetIndex;
}
else
{
ESP_LOGW(TAG, "Duplicate packet: %d", (packetIndexRX + 1) - uplinkPacket.packetIndex);
ESP_LOGW(TAG, "Duplicate packet: %ld", (packetIndexRX + 1) - uplinkPacket.packetIndex);
}
}
@@ -289,9 +289,9 @@ void lora_comms_task(void *pvParameters)
ESP_LOGI(TAG, "lora_comms_task started");
while (foundDevices[0] != 2) {
vTaskDelay(10);
}
// while (foundDevices[0] != 2) {
// vTaskDelay(10);
// }
// Initialize the semaphore for radio access (binary semaphore, 1 = available)
loraRadioMutex = xSemaphoreCreateMutex();