| 108 | } |
| 109 | |
| 110 | QBitArray InputDeviceBitArrayStatus::generateFinalBitArray() |
| 111 | { |
| 112 | int totalArraySize = 0; |
| 113 | totalArraySize = axesStatus.size() + hatButtonStatus.size() + getButtonStatusLocal().size() + m_sensor_status.size(); |
| 114 | QBitArray aggregateBitArray(totalArraySize, false); |
| 115 | int currentBit = 0; |
| 116 | |
| 117 | for (int i = 0; i < axesStatus.size(); i++) |
| 118 | { |
| 119 | aggregateBitArray.setBit(currentBit, axesStatus.at(i)); |
| 120 | currentBit++; |
| 121 | } |
| 122 | |
| 123 | for (int i = 0; i < hatButtonStatus.size(); i++) |
| 124 | { |
| 125 | aggregateBitArray.setBit(currentBit, hatButtonStatus.at(i)); |
| 126 | currentBit++; |
| 127 | } |
| 128 | |
| 129 | for (int i = 0; i < getButtonStatusLocal().size(); i++) |
| 130 | { |
| 131 | aggregateBitArray.setBit(currentBit, getButtonStatusLocal().at(i)); |
| 132 | currentBit++; |
| 133 | } |
| 134 | |
| 135 | for (int i = 0; i < SENSOR_COUNT; i++) |
| 136 | { |
| 137 | aggregateBitArray.setBit(currentBit, m_sensor_status.at(i)); |
| 138 | currentBit++; |
| 139 | } |
| 140 | |
| 141 | return aggregateBitArray; |
| 142 | } |
| 143 | |
| 144 | void InputDeviceBitArrayStatus::clearStatusValues() |
| 145 | { |
no outgoing calls
no test coverage detected