fixed longint conversion Mega

This commit is contained in:
2019-03-07 19:16:03 +03:00
parent eb43bc5d18
commit 515728207f
6 changed files with 31 additions and 20 deletions

View File

@@ -113,6 +113,8 @@ int Input::poll() {
#ifndef DHT_DISABLE
else if (inType & IN_DHT22)
dht22Poll();
#endif
#ifndef COUNTER_DISABLE
else if (inType & IN_COUNTER)
counterPoll();
else if (inType & IN_UPTIME)
@@ -497,20 +499,6 @@ void Input::onAnalogChanged(int newValue) {
}
void Input::printUlongValueToStr(char *valstr, unsigned long value) {
char buf[11];
int i=0;
for(;value>0;i++){
unsigned long mod = value - ((unsigned long)(value/10))*10;
buf[i]=mod+48;
value = (unsigned long)(value/10);
}
for(int n=0;n<=i;n++){
valstr[n]=buf[i-n-1];
}
valstr[i]='\0';
}
bool Input::publishDataToDomoticz(int pollTimeIncrement, aJsonObject *emit, const char *format, ...)
{
#ifdef WITH_DOMOTICZ