Allow propagation of sensor updates from secondary to main
This commit is contained in:
parent
da50a89866
commit
34f129967b
7 changed files with 45 additions and 8 deletions
|
|
@ -128,6 +128,16 @@ void TcpClient::itemUpdated(ItemUpdateRequest update)
|
|||
}
|
||||
}
|
||||
|
||||
void TcpClient::sensorEvent(Sensor sensor, sensor_update_type_t type)
|
||||
{
|
||||
// Only forward user-initiated sensor updates to the server
|
||||
// to prevent feedback loops with backend/remote updates
|
||||
if(type == SENSOR_UPDATE_USER)
|
||||
{
|
||||
Service::sensorEvent(sensor, type);
|
||||
}
|
||||
}
|
||||
|
||||
TcpClient::~TcpClient()
|
||||
{
|
||||
delete socket;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue