Open VF7777 opened 7 years ago
can you provide relevant code?
I can confirm the issue. I also do only get 1 or 0.01 every now and then.
Unfortunately I can't share the code with you and don't have time to prepare a minimal sample. But what I am doing is simply splitting responses by "\r\n" to retrieve a single data set, then split this line by empty spaces to receive the parts of a response, then take the third element (i.e. the actual value) and parse a double using
bool parseSuccess = Double.TryParse(valueString, NumberStyles.Number, CultureInfo.CreateSpecificCulture(HostCulture), out value);
Whereas HostCulture is either "en-US" or "de-DE", depending on the host culture I am using.
This worked for most data sets.
Hi, When I send command 'device_subscribe bat ON' to get battery level, it always returns the value 1 or 0.01, I tested servel hours.
Thank you