|
|
@ -146,10 +146,11 @@ void prvf_report_sample_data(uint32_t frameIndex, one_frame_data_t* data, int32_ |
|
|
|
*******************************************************************************/ |
|
|
|
|
|
|
|
static int m_upload_fd; |
|
|
|
static uint8_t m_datacache[256]; |
|
|
|
static uint8_t m_datacache[360]; |
|
|
|
static int m_remaindatalen = 0; |
|
|
|
static uint32_t m_report_data_sumcheckcode = 0; |
|
|
|
static bool m_isupload_data_state = false; |
|
|
|
static uint32_t m_upload_cnt = 0; |
|
|
|
|
|
|
|
void RecordUpload_report_finish_event(uint32_t sumcheckcode) { |
|
|
|
ify_hrs_packet_t* txheader = (ify_hrs_packet_t*)m_txbuf; |
|
|
@ -201,12 +202,12 @@ static void RecordUpload_tmr_cb(void* p_context) { // |
|
|
|
} |
|
|
|
|
|
|
|
int32_t mtusize = zble_module_get_mtu_size(); |
|
|
|
mtusize = mtusize < 128 ? mtusize : 128; |
|
|
|
mtusize = mtusize < 180 ? mtusize : 180; |
|
|
|
|
|
|
|
uint8_t* data = m_datacache + (sizeof(m_datacache) - m_remaindatalen); |
|
|
|
int len = m_remaindatalen > mtusize ? mtusize : m_remaindatalen; |
|
|
|
|
|
|
|
ZLOGI("upload %d %d %d", len, m_remaindatalen, mtusize); |
|
|
|
// ZLOGI("upload %d %d %d", len, m_remaindatalen, mtusize); |
|
|
|
if (!zdatachannel_is_connected()) { |
|
|
|
ZLOGI("ble is disconnected,stop upload"); |
|
|
|
RecordUpload_ble_stop_upload_record(); |
|
|
@ -233,12 +234,15 @@ static void RecordUpload_tmr_cb(void* p_context) { // |
|
|
|
m_report_data_sumcheckcode += data[i]; |
|
|
|
} |
|
|
|
m_remaindatalen -= len; |
|
|
|
m_upload_cnt += len; |
|
|
|
ZLOGI("has_upload %d %d", m_upload_cnt, len); |
|
|
|
} |
|
|
|
|
|
|
|
int RecordUpload_start(sample_data_filename_t* recordid) { |
|
|
|
// |
|
|
|
// Æô¶¯ |
|
|
|
// |
|
|
|
m_upload_cnt = 0; |
|
|
|
SampleDataMgr_changeToLocalMode(); |
|
|
|
|
|
|
|
m_upload_fd = SampleDataMgr_open(recordid, kwrflag_read_only); |
|
|
|