-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathFanModule.h
More file actions
32 lines (27 loc) · 856 Bytes
/
FanModule.h
File metadata and controls
32 lines (27 loc) · 856 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
/**
* iotinator Fan module
* Xavier Grosjean 2018
* Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Public License
*/
#pragma once
#include "config.h"
#include <XIOTModule.h>
class FanModule:public XIOTModule {
public:
FanModule(FanConfigClass* config, int displayAddr, int displaySda, int displayScl,
int speed1Pin, int speed2Pin, int speed3Pin, int oscPin, bool flipScreen, uint8_t brightness);
protected:
int _speed = 0;
bool _osc = false;
char* _customData() override;
char* _globalStatus() override;
char* useData(char *, int *) override;
bool customProcessSMS(const char* phoneNumber, const bool isAdmin, const char* message) override;
void setOsc(bool);
void setSpeed(int);
void refreshDisplay();
int _speed1Pin;
int _speed2Pin;
int _speed3Pin;
int _oscPin;
};