Events parsing

This page provides information on how to parse critical events and loading process statuses.

Detect status of loading

Detect incoming statuses for understanding executing stage:

liqa.events$
  .subscribe((status) => {
    let msg = "";
    if (status == 10) {
      msg = "Initializing AI models…";
    } else if (status == 80) {
      msg = "Initializing modules…";
    } else if (status == 90) {
      msg = "Starting camera…";
    } else if (status == 100) {
      msg = "Loading finished successfully";
    } else if (status == -10) {
      msg = "Loading failed";
    } else if (status == -80) {
      msg = "Error occurred during LIQA start: Devices not found";
    } else if (status == -90) {
      msg = "Error occurred during LIQA work";
    }
    console.log(msg);
  });

Last updated