Indeed, hence my initial question about the code. Why go through a loop to iterate over all values. If the purpose was to take only the last one a "payload = results[size-1]" would have been enough.
Having said that, looking at MySensors sensors/variables types, it seems that only the V_POSITION is ...
Search found 6 matches
- Friday 23 September 2016 21:08
- Forum: MySensors
- Topic: Question about message parsing code
- Replies: 7
- Views: 1759
- Friday 23 September 2016 19:18
- Forum: MySensors
- Topic: Question about message parsing code
- Replies: 7
- Views: 1759
Re: Question about message parsing code
It seems that indeed, the payload gets truncated. I have made a test with a S_INFO sensor sending a V_TEXT. Below the result of the serial monitor and domoticz results:
- Thursday 22 September 2016 14:21
- Forum: MySensors
- Topic: Question about message parsing code
- Replies: 7
- Views: 1759
Re: Question about message parsing code
I am not making any assumptions really (especially not of buggy behaviour), I am trying to understand how things work. Indeed for now I have not tested anything, I have just read the code. Hence the initial question "Have I missed something?"
I will not have my hand on the stuff needed to test for ...
I will not have my hand on the stuff needed to test for ...
- Wednesday 21 September 2016 14:54
- Forum: MySensors
- Topic: New value type V_CUSTOM and example
- Replies: 7
- Views: 7001
Re: New value type V_CUSTOM and example
@gizmocuz sorry to pester you regarding domoticz code but I have a question regarding the implementation of the V_CUSTOM variable. It seems that in the parseLine method, the part returning the variable from the domoticz db to the sensor is in the section of "message_type == MT_Set" where all the ...
- Wednesday 21 September 2016 8:07
- Forum: MySensors
- Topic: Question about message parsing code
- Replies: 7
- Views: 1759
Re: Question about message parsing code
In 'results', yes, but not in 'payload' which is used in the further processing.
In the case of the gps position, results.size would be 8,
Payload would successivelly be assigned results(5), results(6) and finally results(7). At the end of the loop, payload would only contain the altitude.
Equally ...
In the case of the gps position, results.size would be 8,
Payload would successivelly be assigned results(5), results(6) and finally results(7). At the end of the loop, payload would only contain the altitude.
Equally ...
- Sunday 18 September 2016 11:18
- Forum: MySensors
- Topic: Question about message parsing code
- Replies: 7
- Views: 1759
Question about message parsing code
Hello,
I am trying to understand the code in MySensorBase.cpp.
In
void MySensorsBase::ParseLine()
{
if (m_bufferpos<2)
return;
std::string sLine((char*)&m_buffer);
//_log.Log(LOG_STATUS, sLine.c_str());
std::vector<std::string> results;
StringSplit(sLine, ";", results);
if (results.size ...
I am trying to understand the code in MySensorBase.cpp.
In
void MySensorsBase::ParseLine()
{
if (m_bufferpos<2)
return;
std::string sLine((char*)&m_buffer);
//_log.Log(LOG_STATUS, sLine.c_str());
std::vector<std::string> results;
StringSplit(sLine, ";", results);
if (results.size ...