function CoreStatus_checkInPrinted(&$done = FALSE) { // check printed status by timelapse file detection $CI =& get_instance(); $CI->load->helper('zimapi'); return ZimAPI_checkTimelapse($done); }
function PrinterState_checkTimelapseCondition(&$data_json) { $timelapse_exist = FALSE; $timelapse_done = FALSE; $CI =& get_instance(); $CI->load->helper('zimapi'); $timelapse_exist = ZimAPI_checkTimelapse($timelapse_done); if ($timelapse_exist == TRUE) { if ($timelapse_done == TRUE) { $timelapse_url = $_SERVER['HTTP_HOST'] . '/tmp/' . ZIMAPI_FILENAME_TIMELAPSE; $CI->load->helper('corestatus'); if (CoreStatus_checkTromboning()) { $timelapse_url = 'https://' . $timelapse_url; } else { $timelapse_url = 'http://' . $timelapse_url; } $data_json[PRINTERSTATE_TITLE_TIMELAPSE] = $timelapse_url; } else { $data_json[PRINTERSTATE_TITLE_TIMELAPSE] = PRINTERSTATE_VALUE_TIMELAPSE_GENERATION; } } return; }