| | |
| | | vecBuffer.resize(nReceived); |
| | | CleanInvalidValuesInPlace(nOutNo, vecBuffer); |
| | | |
| | | std::vector<float> vecGlass1, vecGlass2; |
| | | std::vector<float> vecGlass1, vecGlass2; |
| | | if (!SplitGlassSegments(nOutNo, vecBuffer, vecGlass1, vecGlass2, m_fJumpThreshold, m_nJumpWindow, m_nValleyMargin, m_nMinGlass1Count)) { |
| | | AppendLogLineRichStyled(_T("未能识别出两片玻璃的数据。"), LOG_COLOR_WARNING); |
| | | return 0xFF; |
| | |
| | | result[i] = AnalyzeStoredData(i + 1); // OUT1 ~ OUT4 |
| | | } |
| | | |
| | | std::string strProductID; |
| | | m_plcListener.ReadProductID(strProductID); |
| | | m_resultStorage.SaveAnalyzeResult(CString(strProductID.c_str()), result); |
| | | |
| | | CString strLog; |
| | | strLog.Format(_T("分析结果:OUT1: %.3f, OUT2: %.3f, OUT3: %.3f, OUT4: %.3f"), result[0], result[1], result[2], result[3]); |
| | | return result; |