Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add version number to host library #133

Merged
merged 1 commit into from
Jul 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading