The command blight set results in a success message as long as the provided value can be parsed into a u16 even if it is larger than the max brightness supported by the device, while it is silently ignored inside the set_bl function.
Expected behavior:
This should result in an error. The user should be notified that the provided value is too large.
Possible solutions:
set_bl helper function can return an error when the value provided is too large
or
set_bl could return some value wrapped in Ok() to signify that the provided value was ignored or written
or
Use Device struct for handling blight set command, return BlightError (CLI-facing) instead of BlibError
The command
blight set
results in a success message as long as the provided value can be parsed into a u16 even if it is larger than the max brightness supported by the device, while it is silently ignored inside the set_bl function.Expected behavior: This should result in an error. The user should be notified that the provided value is too large.
Possible solutions: