diff options
author | Evgeny Zinoviev <me@ch1p.io> | 2021-05-23 01:45:13 +0300 |
---|---|---|
committer | Evgeny Zinoviev <me@ch1p.io> | 2021-05-23 01:45:13 +0300 |
commit | bda8a1b630d0e41081ac6eacd78648252958eff1 (patch) | |
tree | 9afe989ca17626adbf629ffcd068c210098ee031 | |
parent | f5f43e4e6273401aa62a03bd54099c85fa0cb8a1 (diff) |
p18: fix set-ac-charging-time/set-ac-loads-supply-time
-rw-r--r-- | src/p18/commands.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/p18/commands.cc b/src/p18/commands.cc index f67fe99..5060d49 100644 --- a/src/p18/commands.cc +++ b/src/p18/commands.cc @@ -436,11 +436,13 @@ p18::CommandType validate_input(std::string& command, if (endHour > 23 || endMinute > 59) throw std::invalid_argument("invalid end time"); - arguments[0] = std::to_string(startHour); - arguments[1] = std::to_string(startMinute); + arguments.clear(); - arguments[2] = std::to_string(endHour); - arguments[3] = std::to_string(endMinute); + arguments.emplace_back(std::to_string(startHour)); + arguments.emplace_back(std::to_string(startMinute)); + + arguments.emplace_back(std::to_string(endHour)); + arguments.emplace_back(std::to_string(endMinute)); break; } |