refactoring - simplified usage of hexToDec (#10)

* refactoring - simplified usage of hexToDec - replaced by hexToDecFromResponse

* refactoring - simplified usage of hexToDec - replaced by hexToDecFromResponse (applied to CarHyundaiIoniq.cpp)

* refactoring - simplified usage of hexToDec - replaced by hexToDecFromResponse (applied to rest)

* refactoring - simplified usage of hexToDec - replaced by hexToDecFromResponse (fix)

* refactoring - simplified usage of float(strol(liveData->responseRowMerged.substring(...))) - as liveData->decFromResponse()
This commit is contained in:
Michal
2020-12-07 19:43:38 +01:00
committed by GitHub
parent fe6e4402c4
commit 71dc8e8555
8 changed files with 227 additions and 204 deletions

View File

@@ -222,6 +222,8 @@ class LiveData {
//
void initParams();
float hexToDec(String hexString, byte bytes = 2, bool signedNum = true);
float hexToDecFromResponse(byte from, byte to, byte bytes = 2, bool signedNum = true);
float decFromResponse(byte from, byte to, char **str_end = 0, int base = 16);
float km2distance(float inKm);
float celsius2temperature(float inCelsius);
float bar2pressure(float inBar);