Commit 019a241a by lvshi.gong

修改报警枚举类型

parent 073323de
......@@ -136,7 +136,7 @@ RamdomForestCalculate::RamdomForestCalculate(QObject *parent)
}
//GLS Test
// StreamInfo info(1,"C$14$1$1$1$202$0","1764581206660-0","0");
// StreamInfo info(1,"C$14$1$1$1$101$0","1764733704270-0","0");
// SendStreamAlarminfo(info);
......@@ -161,9 +161,6 @@ RamdomForestCalculate::RamdomForestCalculate(QObject *parent)
//重新训练
});
}
QString RamdomForestCalculate::QueryPowerData(const StreamInfo &alarmInfo)
......@@ -489,7 +486,7 @@ int RamdomForestCalculate::Save_SACDATA(const Dc_SacData &sacdata)
//dbFunc->addDataToQueue(data);
//step4: 删除二进制文件
//QFile::remove(FilePath);
QFile::remove(FilePath);
return 0;
}
......@@ -557,7 +554,6 @@ void RamdomForestCalculate::Retrain()
std::vector<int> TypeValues;
DealRecord(record,FearValues,TypeValues);
Classifier->train(FearValues, TypeValues, 0.2f, 100);
SPDLOG_LOGGER_DEBUG(spdlog::get("logger"),"Begin Train RamdomForestModel");
}
......@@ -3,9 +3,9 @@
enum {
NORMAL = 0, // 正常(缺省值)
BREAKAGE = 1, // 断刀
BREAKAGE = 3, // 断刀
CHIPPING = 2, // 崩刃
WEAR = 3 // 磨损
WEAR = 1 // 磨损
};
//#define DEBUG_PRINT(fmt, ...) debug_printf(" [%s] " fmt, __func__, ##__VA_ARGS__)
......
......@@ -4,34 +4,9 @@
#include "spdlog/sinks/base_sink.h"
//#include "spdlog/sinks/rotating_file_sink.h"
#include "spdlog/sinks/daily_file_sink.h"
//#include "MonitorLogfile.h"
#include <QDir>
#include "MonitorLogfile.h"
//void initSpdlog()
//{
// try {
// QString logDir = qApp->applicationDirPath() + "/log";
// QDir dir(logDir);
// if (!dir.exists())
// dir.mkpath(logDir);
// QString filePath = logDir + "/SigerCalculation.log";
// auto logger = spdlog::daily_logger_mt("logger", filePath.toStdString(), 2, 30);
// logger->set_level(spdlog::level::debug);
// logger->flush_on(spdlog::level::debug);
// logger->set_pattern("[%Y-%m-%d %H:%M:%S.%e][thread %t][%l] : %v");
// SPDLOG_LOGGER_DEBUG(logger, "initSpdlog DEBUG!!!"); // 绝对会写
// logger->flush();
// }
// catch (const spdlog::spdlog_ex& ex) {
// qDebug() << "spdlog error:" << ex.what();
// }
//}
void initSpdlog()
{
try
......@@ -76,8 +51,6 @@ int main(int argc, char *argv[])
RamdomForestCalculate RandomCaculate;
//qRegisterMetaType<Dc_SacData>("Dc_SacData");
// do_test1();
// TcpServerManager manager;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment