mirror of
https://github.com/0x1d/esp8266-laser.git
synced 2025-12-16 10:44:30 +01:00
fix motor numbers and parameter order
This commit is contained in:
@@ -12,15 +12,13 @@ var Sui = {
|
||||
let update = function(endpoint, method, props) {
|
||||
Sui.http.ajax({
|
||||
method: method,
|
||||
endpoint: node.api[endpoint] + props.join('/'),
|
||||
endpoint: node.api[endpoint] + (props ? props.join('/') : ''),
|
||||
cache: false
|
||||
}, actuator.onResponse || null);
|
||||
};
|
||||
Sui.select(actuator.selector).forEach( (domEl) =>{
|
||||
let handle = function(event) {
|
||||
data = [this.value];
|
||||
actuator.data ? data.push(actuator.data.call(this)) : undefined;
|
||||
update.call(this, actuator.api, 'GET', data);
|
||||
update.call(this, actuator.api, 'GET', actuator.data ? actuator.data.call(this) : undefined );
|
||||
}
|
||||
$(domEl).on(actuator.event, handle)
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user