From 11e47bd708bde2c8e3ef3b6849b1dd7f8fbfe607 Mon Sep 17 00:00:00 2001 From: Evgeny Zinoviev Date: Sun, 23 May 2021 01:28:09 +0300 Subject: p18: fix set-charging-source-priority --- src/p18/commands.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/p18/commands.cc b/src/p18/commands.cc index 1a8bc55..74a0571 100644 --- a/src/p18/commands.cc +++ b/src/p18/commands.cc @@ -328,7 +328,7 @@ p18::CommandType validate_input(std::string& command, throw std::invalid_argument("invalid id"); std::array priorities({"SF", "SU", "S"}); - long index = index_of(priorities, arguments[0]); + long index = index_of(priorities, arguments[1]); if (index == -1) throw std::invalid_argument("invalid argument"); -- cgit v1.2.3