test client: Update to handle new file list notification

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
Arksine 2020-08-10 17:48:15 -04:00
parent 7441da4b57
commit 82fbee2bc0
1 changed files with 5 additions and 2 deletions

View File

@ -286,6 +286,9 @@ function get_klippy_info() {
})
.catch((error) => {
update_error(api.printer_info.method, error);
setTimeout(() => {
get_klippy_info();
}, 2000);
});
}
@ -594,8 +597,8 @@ json_rpc.register_method("notify_klippy_state_changed", handle_klippy_state);
function handle_file_list_changed(file_info) {
// This event fires when a client has either added or removed
// a gcode file.
if (file_list_type == file_info.root)
get_file_list(file_info.root);
if (file_list_type == file_info.item.root)
get_file_list(file_info.item.root);
console.log("Filelist Changed:");
console.log(file_info);
}