----------------------------------------------------------------------------- Check if we should AutoAssociate for this group -----------------------------------------------------------------------------
| 157 | // Check if we should AutoAssociate for this group |
| 158 | //----------------------------------------------------------------------------- |
| 159 | void Group::CheckAuto |
| 160 | ( |
| 161 | |
| 162 | ) |
| 163 | { |
| 164 | // Auto-association by default is with group 1 or 255, with group 1 taking precedence. |
| 165 | // Group 255 is always created first, so if this is group 1, we need to turn off the |
| 166 | // auto flag in group 255. All this messing about is to support the various behaviours |
| 167 | // of certain Cooper devices. |
| 168 | if( m_groupIdx == 255 ) |
| 169 | { |
| 170 | m_auto = true; |
| 171 | } |
| 172 | else if( m_groupIdx == 1 ) |
| 173 | { |
| 174 | m_auto = true; |
| 175 | |
| 176 | // Clear the flag from Group 255, if it exists. |
| 177 | if( Driver* driver = Manager::Get()->GetDriver( m_homeId ) ) |
| 178 | { |
| 179 | if( Node* node = driver->GetNodeUnsafe( m_nodeId ) ) |
| 180 | { |
| 181 | if( Group* group = node->GetGroup( 255 ) ) |
| 182 | { |
| 183 | group->SetAuto( false ); |
| 184 | } |
| 185 | } |
| 186 | } |
| 187 | } |
| 188 | } |
| 189 | |
| 190 | |
| 191 |
nothing calls this directly
no test coverage detected