mirror of
https://github.com/azaion/autopilot.git
synced 2026-04-22 23:06:34 +00:00
33399370f3
Simple program to control Siyi A8 mini (actually some other Siyi cameras too). Receiving responce sometimes gives error when checking CRC.
13 lines
243 B
C++
13 lines
243 B
C++
#pragma once
|
|
|
|
#include <QByteArray>
|
|
#include <cstdint>
|
|
|
|
class CRC16 {
|
|
public:
|
|
static void getCRCBytes(const QByteArray &data, uint8_t *bytes);
|
|
|
|
private:
|
|
static uint16_t calculate(const uint8_t *ptr, uint32_t len, uint16_t crcInit);
|
|
};
|