[RN8209] Add task WDT (#1657)
Add WDT and reduce update as we now have a change based pub mechanism Base the change detection on current rather than power and simplify it Round the result to 2 digits after comma Add docs
This commit is contained in:
1 parent
d940ed0f60
commit
4a28f491f5
4 files changed
+51
-30
No files matched your search
@@ -338,6 +338,14 @@ long value_from_hex_data(const char* service_data, int offset, int data_length,
|
||||
return value;
|
||||
}
|
||||
|
||||
/*
|
||||
rounds a number to 2 decimal places
|
||||
example: round(3.14159) -> 3.14
|
||||
*/
|
||||
double round2(double value) {
|
||||
return (int)(value * 100 + 0.5) / 100.0;
|
||||
}
|
||||
|
||||
/*
|
||||
From an hexa char array ("A220EE...") to a byte array (half the size)
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user