Skip to content

Commit

Permalink
Remove int to bool conversion in ChangeConfiguation (#362)
Browse files Browse the repository at this point in the history
* remove int to bool conversion in ChangeConfiguation

* update changelog
  • Loading branch information
matth-x authored Aug 26, 2024
1 parent 974b7b9 commit 46d4399
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
- Fix regression bug of [#345](https://github.com/matth-x/MicroOcpp/pull/345) ([#353](https://github.com/matth-x/MicroOcpp/pull/353), [#356](https://github.com/matth-x/MicroOcpp/pull/356))
- Correct MeterValue PreBoot timestamp ([#354](https://github.com/matth-x/MicroOcpp/pull/354))
- Send errorCode in triggered StatusNotif ([#359](https://github.com/matth-x/MicroOcpp/pull/359))
- Remove int to bool conversion in ChangeConfig ([#362](https://github.com/matth-x/MicroOcpp/pull/362))

## [1.1.0] - 2024-05-21

Expand Down
2 changes: 0 additions & 2 deletions src/MicroOcpp/Operations/ChangeConfiguration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,6 @@ void ChangeConfiguration::processReq(JsonObject payload) {
numBool = true;
} else if (tolower(value[0]) == 'f' && tolower(value[1]) == 'a' && tolower(value[2]) == 'l' && tolower(value[3]) == 's' && tolower(value[4]) == 'e' && !value[5]) {
numBool = false;
} else if (convertibleInt) {
numBool = numInt != 0;
} else {
convertibleBool = false;
}
Expand Down

0 comments on commit 46d4399

Please sign in to comment.