forked from xin/TowerOptoSifAndSpectral
任立新 修改该温控系统的逻辑
This commit is contained in:
@ -20,12 +20,30 @@ void logout(T str)
|
||||
#endif
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
|
||||
void saveDataToFile(QString typeofdata,T str) {
|
||||
const std::string red("\033[0;31m");
|
||||
const std::string green("\033[0;32m");
|
||||
const std::string yellow("\033[0;33m");
|
||||
const std::string blue("\033[0;34m");
|
||||
const std::string magenta("\033[0;35m");
|
||||
const std::string cyan("\033[0;36m");
|
||||
const std::string reset("\033[0m");
|
||||
|
||||
QString qstr11=QString(str);
|
||||
QDateTime currentTime = QDateTime::currentDateTime();
|
||||
std::cout<<green<<currentTime.toString("yyyy-MM-dd hh:mm:ss.zzz").toStdString()<<" "<<magenta<<typeofdata.toStdString()<<reset<<": "<<qstr11.toStdString()<<std::endl<<std::flush;
|
||||
QString qstr=QString(str);
|
||||
writelogtofile(typeofdata,str);
|
||||
|
||||
}
|
||||
|
||||
|
||||
template <typename T>
|
||||
void logout(QString sender,T str,int level = 5)
|
||||
{
|
||||
|
||||
|
||||
|
||||
const std::string red("\033[0;31m");
|
||||
const std::string green("\033[0;32m");
|
||||
const std::string yellow("\033[0;33m");
|
||||
@ -35,6 +53,8 @@ void logout(QString sender,T str,int level = 5)
|
||||
const std::string reset("\033[0m");
|
||||
|
||||
|
||||
|
||||
|
||||
QString qstr11=QString(str);
|
||||
// Log(qstr,3);
|
||||
QDateTime currentTime = QDateTime::currentDateTime();
|
||||
|
||||
Reference in New Issue
Block a user