From 939d6d42bbe7a5f08ad6edfbb30f71ffc4a4d254 Mon Sep 17 00:00:00 2001 From: joevt Date: Sun, 5 Nov 2023 22:47:43 -0800 Subject: [PATCH] machineproperties: More binary property values. --- machines/machineproperties.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/machines/machineproperties.cpp b/machines/machineproperties.cpp index 41e20fc..1dea422 100644 --- a/machines/machineproperties.cpp +++ b/machines/machineproperties.cpp @@ -135,10 +135,10 @@ bool IntProperty::check_val(uint32_t val) void BinProperty::set_string(string val) { - if ((val.compare("ON") == 0) || (val.compare("on") == 0)) { + if ((val.compare("ON") == 0) || (val.compare("on") == 0) || (val.compare("1") == 0) || (val.compare("yes") == 0)) { this->bin_val = 1; this->val = val; - } else if ((val.compare("OFF") == 0) || (val.compare("off") == 0)) { + } else if ((val.compare("OFF") == 0) || (val.compare("off") == 0) || (val.compare("0") == 0) || (val.compare("no") == 0)) { this->bin_val = 0; this->val = val; } else {