diff --git a/src/raspberrypi/rascsi_interface.proto b/src/raspberrypi/rascsi_interface.proto index c552cb57..e21b3dda 100644 --- a/src/raspberrypi/rascsi_interface.proto +++ b/src/raspberrypi/rascsi_interface.proto @@ -169,9 +169,8 @@ message PbOperationParameter { string type = 3; // There is no specific set of values if empty repeated string values = 4; - // Optional default value + // Optional default value. If there is no default the value is mandatory. string default_value = 5; - bool is_mandatory = 6; } // The list of parameters supported by an operation diff --git a/src/raspberrypi/rascsi_response.cpp b/src/raspberrypi/rascsi_response.cpp index 110ad752..6053c2d7 100644 --- a/src/raspberrypi/rascsi_response.cpp +++ b/src/raspberrypi/rascsi_response.cpp @@ -457,7 +457,6 @@ PbOperationParameter *RascsiResponse::AddOperationParameter(PbOperationParameter if (!default_value.empty()) { parameter->set_default_value(default_value); } - parameter->set_is_mandatory(default_value.empty()); return parameter; } diff --git a/src/raspberrypi/rasctl_display.cpp b/src/raspberrypi/rasctl_display.cpp index a746c39d..14f2a881 100644 --- a/src/raspberrypi/rasctl_display.cpp +++ b/src/raspberrypi/rasctl_display.cpp @@ -290,7 +290,7 @@ void RasctlDisplay::DisplayOperationInfo(const PbOperationInfo& operation_info) for (const auto& parameter : operation.parameters()) { cout << " " << parameter.name() << ": " << parameter.type() - << (parameter.is_mandatory() ? ", mandatory" : ", optional"); + << (parameter.default_value().empty() ? ", mandatory" : ", optional"); if (!parameter.description().empty()) { cout << " (" << parameter.description().at("en") << ")"; }