Skip to content

Commit

Permalink
Merge pull request #4720 from letscontrolit/bugfix/p2p_old_builds
Browse files Browse the repository at this point in the history
[P2P] unit with latest build not receiving values of shared plugins #4718
  • Loading branch information
TD-er authored Jun 29, 2023
2 parents bec12df + ecdc53f commit 273e620
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/src/DataStructs/C013_p2p_dataStructs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ bool C013_SensorDataStruct::isValid() const

bool C013_SensorDataStruct::matchesPluginID(pluginID_t pluginID) const
{
if (!validPluginID(deviceNumber) || !validPluginID(pluginID)) {
if (deviceNumber == 255 || !validPluginID(deviceNumber) || !validPluginID(pluginID)) {
// Was never set, so probably received data from older node.
return true;
}
Expand All @@ -42,7 +42,7 @@ bool C013_SensorDataStruct::matchesPluginID(pluginID_t pluginID) const

bool C013_SensorDataStruct::matchesSensorType(Sensor_VType sensor_type) const
{
if (sensorType == Sensor_VType::SENSOR_TYPE_NONE) {
if (deviceNumber == 255 || sensorType == Sensor_VType::SENSOR_TYPE_NONE) {
// Was never set, so probably received data from older node.
return true;
}
Expand Down

0 comments on commit 273e620

Please sign in to comment.