All checks were successful
Test compiling project / test (push) Successful in 2m21s
32 lines
557 B
C++
32 lines
557 B
C++
#ifdef UNIT_TEST
|
|
#include <string>
|
|
typedef std::string String;
|
|
#else
|
|
#include <WString.h>
|
|
#endif
|
|
|
|
#pragma once
|
|
|
|
struct Version {
|
|
int major;
|
|
int minor;
|
|
int patch;
|
|
};
|
|
|
|
struct Firmware {
|
|
Version version;
|
|
String url;
|
|
bool valid;
|
|
String error;
|
|
};
|
|
|
|
struct Configuration {
|
|
Version version;
|
|
String url;
|
|
String Board;
|
|
String Config;
|
|
};
|
|
|
|
Version parseVersion(const char *versionStr);
|
|
Configuration getLatestConfiguration(Configuration *configs, int count);
|
|
bool isVersionNewer(Version oldVersion, Version newVersion); |