-
Notifications
You must be signed in to change notification settings - Fork 0
/
MetronomeLCD.h
44 lines (36 loc) · 913 Bytes
/
MetronomeLCD.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
41
42
43
44
#ifndef __METRONOME_LCD_H__
#define __METRONOME_LCD_H__
#include <Arduino.h>
#include "BasicLCD.h"
#include "MetronomeModel.h"
class MetronomeLCD : public BasicLCD{
private:
MetronomeModel* model;
bool isChanged = false;
int rhythm = 0;
int tempo = 0;
void updateTempo();
void updateRhythm();
uint8_t addr;
unsigned long* time;
unsigned long startTime;
public:
void reset(unsigned long* _time){
time = _time;
startTime = *time;
}
MetronomeLCD(MetronomeModel* _model , unsigned long* _time): BasicLCD(){
model = _model;
time = _time;
startTime = *time;
}
MetronomeLCD(MetronomeModel* _model, byte _addr, int _row, int _col, unsigned long* _time)
: BasicLCD(_addr, _row, _col){
addr = _addr;
model = _model;
time = _time;
startTime = *time;
}
void update();
};
#endif