Skip to content
Permalink
Browse files

add WKMEUP flag

  • Loading branch information...
jp112sdl committed May 23, 2019
1 parent af8e201 commit af9a9da1cad6e2250203cc2210ac2c62c4064649
@@ -85,7 +85,7 @@ class UList0 : public RegList0<Reg0> {
class MeasureEventMsg : public Message {
public:
void init(uint8_t msgcnt, uint16_t tempValues[4], bool batlow) {
Message::init(0x1a, msgcnt, 0x53, (msgcnt % 20 == 1) ? BIDI : BCAST, batlow ? 0x80 : 0x00, 0x41);
Message::init(0x1a, msgcnt, 0x53, (msgcnt % 20 == 1) ? (BIDI | WKMEUP) : BCAST, batlow ? 0x80 : 0x00, 0x41);
for (int i = 0; i < 4; i++) {
pload[i * 3] = (tempValues[i] >> 8) & 0xff;
pload[(i * 3) + 1] = (tempValues[i]) & 0xff;
@@ -100,7 +100,7 @@ class UList0 : public RegList0<Reg0> {
class MeasureEventMsg : public Message {
public:
void init(uint8_t msgcnt, int tempValues[4], bool batlow) {
Message::init(0x1a, msgcnt, 0x53, (msgcnt % 20 == 1) ? BIDI : BCAST, batlow ? 0x80 : 0x00, 0x41);
Message::init(0x1a, msgcnt, 0x53, (msgcnt % 20 == 1) ? (BIDI | WKMEUP) : BCAST, batlow ? 0x80 : 0x00, 0x41);
for (int i = 0; i < 4; i++) {
pload[i * 3] = (tempValues[i] >> 8) & 0xff;
pload[(i * 3) + 1] = (tempValues[i]) & 0xff;
@@ -84,7 +84,7 @@ class WeatherEventMsg : public Message {
if ( batlow == true ) {
t1 |= 0x80; // set bat low bit
}
Message::init(0xb, msgcnt, 0x70, (msgcnt % 20 == 1) ? BIDI : BCAST, t1, t2);
Message::init(0xb, msgcnt, 0x70, (msgcnt % 20 == 1) ? (BIDI | WKMEUP): BCAST, t1, t2);
}
};

@@ -83,7 +83,7 @@ class WeatherEventMsg : public Message {
if ( batlow == true ) {
t1 |= 0x80; // set bat low bit
}
Message::init(0xc, msgcnt, 0x70, (msgcnt % 20 == 1) ? BIDI : BCAST, t1, t2);
Message::init(0xc, msgcnt, 0x70, (msgcnt % 20 == 1) ? (BIDI | WKMEUP) : BCAST, t1, t2);
pload[0] = humidity;
}
};
@@ -84,7 +84,7 @@ class WeatherEventMsg : public Message {
if ( batlow == true ) {
t1 |= 0x80; // set bat low bit
}
Message::init(0xc, msgcnt, 0x70, (msgcnt % 20 == 1) ? BIDI : BCAST, t1, t2);
Message::init(0xc, msgcnt, 0x70, (msgcnt % 20 == 1) ? (BIDI | WKMEUP) : BCAST, t1, t2);
pload[0] = humidity;
}
};
@@ -87,7 +87,7 @@ class WeatherEventMsg : public Message {
if ( batlow == true ) {
t1 |= 0x80; // set bat low bit
}
Message::init(0xc, msgcnt, 0x70, (msgcnt % 20 == 1) ? BIDI : BCAST, t1, t2);
Message::init(0xc, msgcnt, 0x70, (msgcnt % 20 == 1) ? (BIDI | WKMEUP) : BCAST, t1, t2);
pload[0] = humidity;
}
};
@@ -85,7 +85,7 @@ class WeatherEventMsg : public Message {
if ( batlow == true ) {
t1 |= 0x80; // set bat low bit
}
Message::init(0xc, msgcnt, 0x70, (msgcnt % 20 == 1) ? BIDI : BCAST, t1, t2);
Message::init(0xc, msgcnt, 0x70, (msgcnt % 20 == 1) ? (BIDI | WKMEUP) : BCAST, t1, t2);
pload[0] = humidity;
}
};
@@ -84,7 +84,7 @@ class WeatherEventMsg : public Message {
if ( batlow == true ) {
t1 |= 0x80; // set bat low bit
}
Message::init(0xc, msgcnt, 0x70, (msgcnt % 20 == 1) ? BIDI : BCAST, t1, t2);
Message::init(0xc, msgcnt, 0x70, (msgcnt % 20 == 1) ? (BIDI | WKMEUP) : BCAST, t1, t2);
pload[0] = humidity;
}
};
@@ -84,7 +84,7 @@ class WeatherEventMsg : public Message {
if ( batlow == true ) {
t1 |= 0x80; // set bat low bit
}
Message::init(0xc, msgcnt, 0x70, (msgcnt % 20 == 1) ? BIDI : BCAST, t1, t2);
Message::init(0xc, msgcnt, 0x70, (msgcnt % 20 == 1) ? (BIDI | WKMEUP) : BCAST, t1, t2);
pload[0] = humidity;
}
};

0 comments on commit af9a9da

Please sign in to comment.
You can’t perform that action at this time.