28
28
/* *****************************************************************************
29
29
ENUM
30
30
******************************************************************************/
31
- enum class PlaybackCommands : u_int8_t {
31
+ enum class PlaybackCommands : uint8_t {
32
32
FastForward = 0 ,
33
33
Next = 1 ,
34
34
Pause = 2 ,
@@ -39,7 +39,7 @@ enum class PlaybackCommands : u_int8_t {
39
39
Stop = 7 ,
40
40
None = 255
41
41
};
42
- enum class InputValue : u_int8_t {
42
+ enum class InputValue : uint8_t {
43
43
AUX1 = 0 ,
44
44
AUX2 = 1 ,
45
45
AUX3 = 2 ,
@@ -110,17 +110,17 @@ enum class InputValue : u_int8_t {
110
110
class Television {
111
111
public:
112
112
bool swi;
113
- u_int8_t vol;
113
+ uint8_t vol;
114
114
bool mut;
115
115
PlaybackCommands pbc;
116
116
InputValue inp;
117
- u_int16_t cha;
117
+ uint16_t cha;
118
118
119
119
120
- Television (bool swi, u_int8_t vol, bool mut, PlaybackCommands pbc, InputValue inp, u_int16_t cha): swi(swi), vol(vol), mut(mut), pbc(pbc), inp(inp), cha(cha) {
120
+ Television (bool const swi, uint8_t const vol, bool const mut, PlaybackCommands const pbc, InputValue const inp, uint16_t const cha): swi(swi), vol(vol), mut(mut), pbc(pbc), inp(inp), cha(cha) {
121
121
}
122
122
123
- bool operator ==(Television & aTV) {
123
+ bool operator ==(Television const & aTV) {
124
124
return
125
125
aTV.swi == swi &&
126
126
aTV.vol == vol &&
@@ -130,7 +130,7 @@ class Television {
130
130
aTV.cha == cha;
131
131
}
132
132
133
- bool operator !=(Television & aTV) {
133
+ bool operator !=(Television const & aTV) {
134
134
return !(operator ==(aTV));
135
135
}
136
136
@@ -142,14 +142,14 @@ class CloudTelevision : public ArduinoCloudProperty {
142
142
_cloud_value;
143
143
public:
144
144
CloudTelevision () : _value(false , 0 , false , PlaybackCommands::None, InputValue::TV, 0 ), _cloud_value(false , 0 , false , PlaybackCommands::None, InputValue::TV, 0 ) {}
145
- CloudTelevision (bool swi, u_int8_t vol, bool mut, PlaybackCommands pbc, InputValue inp, u_int16_t cha) : _value(swi, vol, mut, pbc, inp, cha), _cloud_value(swi, vol, mut, pbc, inp, cha) {}
145
+ CloudTelevision (bool const swi, uint8_t const vol, bool const mut, PlaybackCommands const pbc, InputValue const inp, uint16_t const cha) : _value(swi, vol, mut, pbc, inp, cha), _cloud_value(swi, vol, mut, pbc, inp, cha) {}
146
146
147
147
virtual bool isDifferentFromCloud () {
148
148
149
149
return _value != _cloud_value;
150
150
}
151
151
152
- CloudTelevision& operator =(Television aTV) {
152
+ CloudTelevision& operator =(Television const aTV) {
153
153
_value.swi = aTV.swi ;
154
154
_value.vol = aTV.vol ;
155
155
_value.mut = aTV.mut ;
@@ -172,7 +172,7 @@ class CloudTelevision : public ArduinoCloudProperty {
172
172
return _value.swi ;
173
173
}
174
174
175
- u_int8_t getVolume () {
175
+ uint8_t getVolume () {
176
176
return _value.vol ;
177
177
}
178
178
@@ -188,7 +188,7 @@ class CloudTelevision : public ArduinoCloudProperty {
188
188
return _value.inp ;
189
189
}
190
190
191
- u_int16_t getChannel () {
191
+ uint16_t getChannel () {
192
192
return _value.cha ;
193
193
}
194
194
0 commit comments