Skip to content

Commit

Permalink
Add version number to host library
Browse files Browse the repository at this point in the history
  • Loading branch information
loostrum committed Jul 10, 2023
1 parent e26b26d commit 90cfe35
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down
1 change: 1 addition & 0 deletions host/include/PowerSensor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions host/src/psconfig.cc
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,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:lph")) >= 0;) {
switch (opt) {
// device select
Expand Down
1 change: 1 addition & 0 deletions host/src/psrun.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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':
Expand Down
1 change: 1 addition & 0 deletions host/src/pstest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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':
Expand Down

0 comments on commit 90cfe35

Please sign in to comment.