* @brief Returns the source's frame detection mode as a combobox index. */
| 210 | * @brief Returns the source's frame detection mode as a combobox index. |
| 211 | */ |
| 212 | int DataModel::FrameParserModel::detectionIndex() const |
| 213 | { |
| 214 | const auto detection = static_cast<SerialStudio::FrameDetection>(currentSource().frameDetection); |
| 215 | const auto idx = kDetectionValues.indexOf(detection); |
| 216 | return idx >= 0 ? static_cast<int>(idx) : 0; |
| 217 | } |
| 218 | |
| 219 | /** |
| 220 | * @brief Returns the source's checksum algorithm as a combobox index. |