-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathfourwayif.h
More file actions
42 lines (30 loc) · 950 Bytes
/
fourwayif.h
File metadata and controls
42 lines (30 loc) · 950 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#ifndef FOURWAYIF_H
#define FOURWAYIF_H
#include <QMessageBox>
class FourWayIF
{
public:
FourWayIF();
QByteArray makeFourWayWriteCommand(const QByteArray sendbuffer, int buffer_size, uint16_t address);
QByteArray makeFourWayReadCommand( int buffer_size, uint16_t address );
QByteArray makeFourWayReadEEPROMCommand( int buffer_size, uint16_t address );
QByteArray makeFourWayCommand(uint8_t cmd, uint8_t device_num);
uint16_t makeCRC(const QByteArray data);
uint16_t eeprom_address;
bool checkCRC(const QByteArray data , uint16_t buffer_length);
bool ACK_required();
bool ACK_received();
void set_Ack_req(char ackreq);
uint8_t connected_motor;
bool memory_divider_required_four;
bool ack_required;
bool ack_received;
bool passthrough_started;
bool ESC_connected;
bool direct;
uint8_t ack_type;
private:
int testVar;
char ack_req;
};
#endif // FOURWAYIF_H