diff --git a/.bumpversion.cfg b/.bumpversion.cfg index df56fa7a..a56abfac 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -9,6 +9,10 @@ replace = version: {new_version} search = PowerSensor3 VERSION {current_version} replace = PowerSensor3 VERSION {new_version} +[bumpversion:file:host/include/PowerSensor.hpp] +search = POWERSENSOR_VERSION = "{current_version}"; +search = POWERSENSOR_VERSION = "{new_version}"; + [bumpversion:file(F401):device/PowerSensor/PowerSensor.ino] search = VERSION "F401-{current_version}" replace = VERSION "F401-{new_version}" diff --git a/host/include/PowerSensor.hpp b/host/include/PowerSensor.hpp index e27fb5f0..8539d6f4 100644 --- a/host/include/PowerSensor.hpp +++ b/host/include/PowerSensor.hpp @@ -17,6 +17,7 @@ static const unsigned MAX_SENSORS = 8; static const unsigned MAX_PAIRS = MAX_SENSORS / 2; static const float VOLTAGE = 3.3; static const unsigned MAX_LEVEL = 1023; +static const std::string POWERSENSOR_VERSION = "1.1.0"; /** * @brief Struct containing values of all active sensors at a single point in time diff --git a/host/src/psconfig.cc b/host/src/psconfig.cc index 5f7452ab..40ab190a 100644 --- a/host/src/psconfig.cc +++ b/host/src/psconfig.cc @@ -190,6 +190,7 @@ int main(int argc, char *argv[]) { bool doWriteConfig = false; bool doPrint = false; + std::cout << "psconfig version " << PowerSensor3::POWERSENSOR_VERSION << std::endl << std::endl; for (int opt; (opt = getopt(argc, argv, "d:s:i:t:av:n:o:ph")) >= 0;) { switch (opt) { // device select diff --git a/host/src/psrun.cc b/host/src/psrun.cc index f47a405a..5c62c0b3 100644 --- a/host/src/psrun.cc +++ b/host/src/psrun.cc @@ -18,6 +18,7 @@ int main(int argc, char *argv[]) { std::string dumpFileName; int sensorPair = -1; + std::cout << "psrun version " << PowerSensor3::POWERSENSOR_VERSION << std::endl << std::endl; for (int opt; (opt = getopt(argc, argv, "d:f:s:")) >= 0;) { switch (opt) { case 'd': diff --git a/host/src/pstest.cc b/host/src/pstest.cc index 909c3b8e..ab9128a4 100644 --- a/host/src/pstest.cc +++ b/host/src/pstest.cc @@ -21,6 +21,7 @@ int main(int argc, char *argv[]) { std::string dumpFileName; int sensorPair = -1; + std::cout << "pstest version " << PowerSensor3::POWERSENSOR_VERSION << std::endl << std::endl; for (int opt; (opt = getopt(argc, argv, "d:f:s:")) >= 0;) { switch (opt) { case 'd':