Torc  0.1
torci2cpca9685.h
Go to the documentation of this file.
1 #ifndef TORCI2CPCA9685_H
2 #define TORCI2CPCA9685_H
3 
4 // Qt
5 #include <QMap>
6 
7 // Torc
8 #include "../torcpwmoutput.h"
9 #include "../torcoutputs.h"
10 #include "torci2cbus.h"
11 
12 #define PCA9685 QStringLiteral("pca9685")
13 
14 class TorcI2CPCA9685;
15 
17 {
18  Q_OBJECT
19 
20  public:
21  TorcI2CPCA9685Channel(int Number, TorcI2CPCA9685 *Parent, const QVariantMap &Details);
23 
24  QStringList GetDescription(void);
25 
26  public slots:
27  void SetValue (double Value);
28 
29  private:
30  int m_channelNumber;
31  int m_channelValue;
32  TorcI2CPCA9685 *m_parent;
33 
34  private:
35  Q_DISABLE_COPY(TorcI2CPCA9685Channel)
36 };
37 
39 {
40  friend class TorcI2CPCA9685Channel;
41 
42  public:
43  TorcI2CPCA9685(int Address, const QVariantMap &Details);
44  ~TorcI2CPCA9685();
45 
46  protected:
47  bool SetPWM (int Channel, int Value);
48 
49  private:
50  Q_DISABLE_COPY(TorcI2CPCA9685)
51  TorcI2CPCA9685Channel *m_outputs[16];
52 };
53 
54 #endif // TORCI2CPCA9685_H
QStringList GetDescription(void)
void SetValue(double Value)
TorcI2CPCA9685Channel(int Number, TorcI2CPCA9685 *Parent, const QVariantMap &Details)