mirror of
https://github.com/eclipse/upm.git
synced 2025-07-02 09:51:14 +03:00
Fix some issues for string based constructors
Signed-off-by: Adelin Dobre <adelin.dobre@rinftech.com> Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
This commit is contained in:

committed by
Mihai Tudor Panu

parent
8f11061de3
commit
2975bae075
@ -86,12 +86,12 @@ ABP::ABP(std::string initStr) : mraaIo(initStr)
|
||||
m_abp->abp_pressure_min = 0;
|
||||
|
||||
for (std::string tok : upmTokens) {
|
||||
if(tok.substr(0,12) == "maxPressure:") {
|
||||
int pmax = std::stoi(tok.substr(12),nullptr,0);
|
||||
if(tok.substr(0, 12) == "maxPressure:") {
|
||||
int pmax = std::stoi(tok.substr(12), nullptr, 0);
|
||||
setMaxPressure(pmax);
|
||||
}
|
||||
if(tok.substr(0,12) == "minPressure:") {
|
||||
int pmin = std::stoi(tok.substr(12),nullptr,0);
|
||||
if(tok.substr(0, 12) == "minPressure:") {
|
||||
int pmin = std::stoi(tok.substr(12), nullptr, 0);
|
||||
setMinPressure(pmin);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user