Skip to content
This repository has been archived by the owner on Oct 16, 2023. It is now read-only.

Commit

Permalink
Merge pull request #12 from apollo-lhc/release-v1.1.1
Browse files Browse the repository at this point in the history
Adding zero padding to SN etc
  • Loading branch information
dgastler authored Sep 17, 2020
2 parents 51da041 + 3268c36 commit 26bef7a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/ApolloMonitor/ApolloMonitor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -73,19 +73,19 @@ static std::string ReplaceInString(std::string original,

void ApolloMonitor::ReplaceSN(std::string & original){
char buffer[20];
snprintf(buffer,20,"%d",SM->GetSerialNumber());
snprintf(buffer,20,"%02d",SM->GetSerialNumber());
original = ReplaceInString(original,"$SN",buffer);
}

void ApolloMonitor::ReplaceRN(std::string & original){
char buffer[20];
snprintf(buffer,20,"%d",SM->GetRevNumber());
snprintf(buffer,20,"%02d",SM->GetRevNumber());
original = ReplaceInString(original,"$RN",buffer);
}

void ApolloMonitor::ReplaceShelfID(std::string & original){
char buffer[20];
snprintf(buffer,20,"%d",SM->GetShelfID());
snprintf(buffer,20,"%02d",SM->GetShelfID());
original = ReplaceInString(original,"$SHELF_ID",buffer);
}

Expand Down

0 comments on commit 26bef7a

Please sign in to comment.