mirror of
https://github.com/outbackdingo/sysadm.git
synced 2026-01-27 18:20:23 +00:00
API Change (new action):
New "action" for the sysadm/moused class:
"set_device_options" - Change the options for a particular device.
REQUIRED ARGUMENTS: "device":"<device_id>", and at least 1 of the available options for device configuration (multiple options may be changed in a single API request).
------------
REST Request (example):
-------------------------------
PUT /sysadm/moused
{
"accel_exponential" : "1.5",
"action" : "set_device_options",
"device" : "psm0"
}
WebSocket Request:
-------------------------------
{
"id" : "fooid",
"namespace" : "sysadm",
"name" : "moused",
"args" : {
"accel_exponential" : "1.5",
"device" : "psm0",
"action" : "set_device_options"
}
}
Response:
-------------------------------
{
"args": {
"set_device_options": {
"accel_exponential": "1.5",
"accel_linear": "1.0",
"device": "psm0",
"emulate_button_3": "false",
"hand_mode": "right",
"resolution": "medium-low",
"terminate_drift_threshold_pixels": "0",
"virtual_scrolling": "false"
}
},
"id": "fooid",
"name": "response",
"namespace": "sysadm"
}
This commit is contained in:
@@ -1230,7 +1230,7 @@ RestOutputStruct::ExitCode WebSocket::EvaluateSysadmMousedRequest(const QJsonVal
|
||||
}else if(action == "read_device_options"){
|
||||
outobj = sysadm::moused::readOptions(in_args.toObject());
|
||||
}else if(action == "set_device_options"){
|
||||
|
||||
outobj = sysadm::moused::setOptions(in_args.toObject());
|
||||
}
|
||||
|
||||
//check return structure for validity
|
||||
|
||||
Reference in New Issue
Block a user