@ -11,3 +11,9 @@ f.close()
env.Append(CPPDEFINES=[
("FW_VERSION", ver)
])
drone_semver = env["ENV"].get("DRONE_SEMVER")
if drone_semver:
("DRONE_SEMVER", "\"" + drone_semver.replace("\"", "\\\"") + "\"")
@ -256,7 +256,15 @@ void helloWorld()
display.setCursor(5, display.height()-5);
display.setFont(&Org_01);
#if defined DRONE_SEMVER
display.print("Version ");
#define xstr(s) str(s)
#define str(s) #s
display.print(xstr(DRONE_SEMVER));
#elif defined FW_VERSION
display.print("Build ");
display.print(FW_VERSION);
#endif
}
while (display.nextPage());
//Serial.println("helloWorld done");
@ -13,6 +13,10 @@
#include <Arduino.h>
#ifndef FW_VERSION
#define FW_VERSION 0
class XD0OTA {
public:
XD0OTA(String deviceName);