|
|
@ -260,6 +260,12 @@ int RecordUpload_stop_upload() { |
|
|
|
m_isupload_data_state = false; |
|
|
|
SampleDataMgr_changeToExtMode(); |
|
|
|
app_timer_stop(m_record_upload_tmr); |
|
|
|
|
|
|
|
if (m_upload_fd > 0) { |
|
|
|
SampleDataMgr_close(m_upload_fd); |
|
|
|
m_upload_fd = 0; |
|
|
|
} |
|
|
|
|
|
|
|
return 0; |
|
|
|
} |
|
|
|
bool RecordUpload_is_uploading() { return m_isupload_data_state; } |
|
|
@ -364,6 +370,12 @@ static void prvf_process_ble_rx_data(void* p_event_data, uint16_t len) { |
|
|
|
if (RecordUpload_is_uploading()) { |
|
|
|
ZLOGI("uploading,can not start capture"); |
|
|
|
send_error_receipt(rxheader, kifyhrs_ecode_device_busy); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
if (!hwss_line_detect_get_state()) { |
|
|
|
send_error_receipt(rxheader, kifyhrs_ecode_electrode_is_not_inserted); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
DeviceCtrl_startSample(0); |
|
|
@ -384,6 +396,12 @@ static void prvf_process_ble_rx_data(void* p_event_data, uint16_t len) { |
|
|
|
if (RecordUpload_is_uploading()) { |
|
|
|
ZLOGI("uploading,can not start capture"); |
|
|
|
send_error_receipt(rxheader, kifyhrs_ecode_device_busy); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
if (!hwss_line_detect_get_state()) { |
|
|
|
send_error_receipt(rxheader, kifyhrs_ecode_electrode_is_not_inserted); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
DeviceCtrl_startSample(capture_time_s); |
|
|
|