ome fixes
This commit is contained in:
parent
d39bd6b8b0
commit
616a3af2c0
|
@ -93,7 +93,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAS_MANNLCOUNTER
|
#ifdef HAS_MANNLCOUNTER
|
||||||
volatile uint8_t count_min = 0;
|
volatile uint16_t count_min = 0;
|
||||||
volatile uint32_t count_all = 0;
|
volatile uint32_t count_all = 0;
|
||||||
volatile unsigned long alteZeit=0, entprellZeit=20; //ms
|
volatile unsigned long alteZeit=0, entprellZeit=20; //ms
|
||||||
#endif
|
#endif
|
||||||
|
@ -309,7 +309,7 @@ void loop()
|
||||||
#elif defined HAS_MANNLCOUNTER
|
#elif defined HAS_MANNLCOUNTER
|
||||||
struct lora_data {
|
struct lora_data {
|
||||||
uint8_t bat;
|
uint8_t bat;
|
||||||
uint8_t count_min;
|
uint16_t count_min;
|
||||||
uint32_t count_all;
|
uint32_t count_all;
|
||||||
} __attribute__ ((packed)) data;
|
} __attribute__ ((packed)) data;
|
||||||
#elif defined HAS_ALARM
|
#elif defined HAS_ALARM
|
||||||
|
@ -388,6 +388,11 @@ void loop()
|
||||||
alarm = false;
|
alarm = false;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAS_MANNLCOUNTER
|
||||||
|
data.count_all=count_all;
|
||||||
|
data.count_min=count_min;
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined DS18B20_PIN
|
#if defined DS18B20_PIN
|
||||||
|
|
||||||
#ifdef DS18B20_POWER
|
#ifdef DS18B20_POWER
|
||||||
|
|
|
@ -24,9 +24,9 @@ function Decoder(bytes, port) {
|
||||||
return decoded;
|
return decoded;
|
||||||
}
|
}
|
||||||
// Mannl-counter
|
// Mannl-counter
|
||||||
if (bytes.length == 8){
|
if (bytes.length == 7){
|
||||||
decoded.countmin = ((bytes[1]) | (bytes[2] << 8 ));
|
decoded.countmin = ((bytes[1]) | (bytes[2] << 8 ));
|
||||||
decoded.countall = ((bytes[1]) | (bytes[2] << 8 ) | (bytes[3] << 16 ) | (bytes[4] << 24));
|
decoded.countall = ((bytes[3]) | (bytes[4] << 8 ) | (bytes[5] << 16 ) | (bytes[6] << 24));
|
||||||
return decoded;
|
return decoded;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue