Skip to content

Commit

Permalink
always decode UID
Browse files Browse the repository at this point in the history
  • Loading branch information
someweisguy committed Nov 17, 2022
1 parent 3673914 commit 7481869
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/private/rdm_encode/functions.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#pragma once

#include <stdint.h>
#include <string.h>

#include "endian.h"
#include "esp_dmx.h"
Expand Down Expand Up @@ -56,7 +57,7 @@ size_t rdm_encode_disc_response(uint8_t *data, size_t preamble_len,
*
* @param[in] data The buffer in which the data to decode is stored.
* @param[out] uid The decoded UID in the response.
* @return true if the data checksum was a valid.
* @return true if the data checksum was valid.
* @return false if the data checksum was invalid.
*/
bool rdm_decode_disc_response(const uint8_t *data, rdm_uid_t *uid) {
Expand All @@ -67,9 +68,6 @@ bool rdm_decode_disc_response(const uint8_t *data, rdm_uid_t *uid) {
break;
}
}
if (data[preamble_len] != RDM_DELIMITER) {
return false; // Not a valid discovery response
}

// Decode the 6-byte UID and get the packet sum
uint16_t sum = 0;
Expand Down

0 comments on commit 7481869

Please sign in to comment.