2025-08-20 23:06:28 +08:00
|
|
|
#ifndef BASIC_H
|
|
|
|
|
#define BASIC_H
|
|
|
|
|
#include <GlobalDefinitions/DataType.h>
|
|
|
|
|
#include <QCoreApplication>
|
|
|
|
|
#include <QTime>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
double map(double x, double in_min, double in_max, double out_min, double out_max);
|
2025-10-10 17:44:10 +08:00
|
|
|
void Sleep_ms(uint16_t msec);
|
2025-09-15 22:28:43 +08:00
|
|
|
bool getBitOf32Data(uint32_t data, int bitIndex, bool defaultValue = false);
|
|
|
|
|
bool setBitOf32Data(uint32_t &data, int bitIndex);
|
|
|
|
|
bool clearBitOf32Data(uint32_t &data, int bitIndex);
|
|
|
|
|
bool writeBitOf32Data(uint32_t &data, int bitIndex, bool bitValue);
|
|
|
|
|
QString variantToFormattedString(const QVariant& variant, int decimalDigits =2);
|
2025-08-20 23:06:28 +08:00
|
|
|
#endif // BASIC_H
|