ESPectre SDK 2.8.0-280-gac7af68
Wi-Fi CSI motion sensing for ESP32 firmware
Loading...
Searching...
No Matches
espectre_sdk_version.h File Reference

Compile-time identity of the ESPectre SDK sources you compiled against. More...

Go to the source code of this file.

Namespaces

namespace  espectre

Macros

#define ESPECTRE_SDK_VERSION_NUMBER   ((ESPECTRE_SDK_VERSION_MAJOR * 10000) + (ESPECTRE_SDK_VERSION_MINOR * 100) + ESPECTRE_SDK_VERSION_PATCH)
 Single comparable integer for the SDK version, as MMmmpp.
#define ESPECTRE_SDK_VERSION_AT_LEAST(major, minor, patch)
 Compile-time feature guard.

Functions

constexpr const char * espectre::espectre_sdk_version ()
 The SDK version as a string, usable where a macro is not.

Detailed Description

Compile-time identity of the ESPectre SDK sources you compiled against.

This is the version of the SDK, not of your firmware. The two are deliberately separate:

  • ESPECTRE_SDK_VERSION_STRING is baked in at compile time and identifies the ESPectre sources in your build. Use it in diagnostics, bug reports, and to guard code against SDK releases.
  • espectre::espectre_firmware_version() (firmware_version.h) reports the application version supplied by your build system. In an integration it is your product's version, not ESPectre's.

First-party firmware and host tests define these macros from git describe, using either the numeric tag or a moving <tag>-<commit-count>-g<hash> identity. Published SDK bundles stamp the same identity into this header. There is no in-tree fallback: configure fails without git history, and an unstamped header does not compile. ESPECTRE_SDK_VERSION_AT_LEAST() uses the numeric tag core.

Definition in file espectre_sdk_version.h.

Macro Definition Documentation

◆ ESPECTRE_SDK_VERSION_NUMBER

#define ESPECTRE_SDK_VERSION_NUMBER   ((ESPECTRE_SDK_VERSION_MAJOR * 10000) + (ESPECTRE_SDK_VERSION_MINOR * 100) + ESPECTRE_SDK_VERSION_PATCH)

Single comparable integer for the SDK version, as MMmmpp.

Example: 3.0.0 becomes 30000.

Definition at line 46 of file espectre_sdk_version.h.

◆ ESPECTRE_SDK_VERSION_AT_LEAST

#define ESPECTRE_SDK_VERSION_AT_LEAST ( major,
minor,
patch )
Value:
(ESPECTRE_SDK_VERSION_NUMBER >= ((major) * 10000 + (minor) * 100 + (patch)))
#define ESPECTRE_SDK_VERSION_NUMBER
Single comparable integer for the SDK version, as MMmmpp.

Compile-time feature guard.

Use it to keep one integration compiling against several SDK releases:

#if ESPECTRE_SDK_VERSION_AT_LEAST(3, 1, 0)
controller.set_motion_hits_runtime(3, 5);
#endif

Definition at line 59 of file espectre_sdk_version.h.