-
Notifications
You must be signed in to change notification settings - Fork 1
/
signals.h
40 lines (30 loc) · 869 Bytes
/
signals.h
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
#ifndef SIGNALS_H
#define SIGNALS_H
#include <QTimer>
#include <QVector>
#define NUMBER_OF_AFR_ROWS 11
#define NUMBER_OF_AFR_COLUMNS 16
#define ROWS_TIMES_COLUMNS 160
#include "serialhandler.h"
#define TIMEOUT_RETRANSMIT 50
#define TIMEOUT_EXIT 500
const uint16_t checkSumInitial= 0xFFFF;
class Signals
{
public:
Signals(SerialHandler* serialWriter);
void reset();
int startSendingData();
int stopSendingData();
void synchronizeParamters();
int sendTable(const QVector<QVector<float>> &afr_table);
QVector<float> receiveTable(const QVector<QVector<int>> &afr_requests);
int setIdleFuelRatio(float value);
int setCurrentFuelRatio(float value);
int setResetFuelRatio(float value);
int setDesiredRPM(int32_t value);
int setDesiredO2(float value);
private:
SerialHandler* m_serialWriter;
};
#endif // SIGNALS_H