你好呀,
参考前一个链接(https://support.dialog-semiconductor.com/forums/post/dialog-smartbond-bl...我评论了。我不知道如何做到这件事。我已经在SDK 5的自定义配置文件中尝试了此功能,我能够从心率模块获取ADC数据。所以现在我想在SDK 3中将这个函数实施到心率概况,但似乎我不知道在哪里放置这个功能以使其工作。我已经包括ADC标题文件。(附件7)。我希望在概要文件中以BPM单元通知心率值。谢谢。
Device:
请看看这一点updated attachment instead. Thanks
嗨Herochua617,
关于你在谈论哪个功能?我没有看到您上传的附件中的任何功能名称,因为我提到了上一篇文章,请查看RW BLE心率配置文件(HRP)接口规范,以便检查您需要与之交换的消息配置文件以与HRP配置文件模块进行通信。
谢谢mt_dialog.
你好呀,
我搜索了文件RW-BLE-HRP - 但它看起来非常表面。它没有显示我需要放置我的ADC编码,以便我获取数据。
uint8_t heart_rate, sample, sample2;
adc_init (GP_ADC_SE, 0, GP_ADC_ATTN3X);
adc_enable_channel(adc_channel_p01);
sample = adc_get_sample ();
adc_init(gp_adc_se,gp_adc_sign,gp_adc_attn3x);
adc_enable_channel(adc_channel_p01);
sample2 = adc_get_sample ();
heart_rate = (sample + sample2);
heart_rate = heart_rate / 2;
app_heart_rate_set_value(heart_rate)
this is the adc function I have been talking about and i fed the output of the adc to app_heart_set_value which is one of the function in app_hrps.c. Refer to Attachment 8. Thanks
嗨Herochua617,
文档资料的信息解释道e exposes in order for you to use it, where you are going to perform the measurement from the sensor it depends on your application. So the document mentions a message called HRPS_MEAS_SEND_REQ, this is what should be invoked in order to send notifications to the other side of the central (the notifications will reach the other side as long as you have enabled the notification from the central side). So you can trigger that message via a timer and perform the adc measurement as soon as the message is served, get the value from the adc, pack the value in the message and send the message to the profile. Something like you have allready done. How to trigger the function that depends as i ve mentioned on your application, it could be upon connection, or when the central writes the specified CCC of the heart rate profile in order to enable the notifications, you can catch that event in the gattc_write_cmd_ind_handler() in the hrps_task.c file.
谢谢mt_dialog.
你好,
我在gattc_write_cmd_ind_handler中称为函数。但值不更新。我需要关闭和通知以获得该值。顺便说一下,值不应该这么高,因为我没有坚持我的身体上的电极。请参考附件9.非常感谢!
嗨Herochua617,
You will have to turn the notifications on in order to trigger the gattc_write_cmd_ind_handler() and in order for the timer to be triggered, also where you have placed the function whenever the gattc_write_cmd_ind_handler() regardless which characteristic is writen the timer will get activated, the point was to have the timer counting as soon as you write the CCC characteristic, please try to read and understand the code. the regarding the values that you get, i am not able to assume why they are high (this is something that you have to find out via debugging), i would suggest to send dummy data until you can verify that you can send data properly.
谢谢mt_dialog.
你好呀,
我想问一下,app_timer_set与app_easy_timer不同。我可以使用app_timer_set来调用函数,就像app_easy_timer一样?
你好呀,
我一直在尝试了解编码并试图改变定时器函数的放置。我希望在我的智能手机上有一个实时数据,这意味着一旦通知打开,该值将通过心率配置文件描述,直到我关闭通知,但似乎无论我放置定时器,都会显示实时变化,但似乎无论我放置定时器,结果似乎没有实时数据,而是没有实时数据。非实时数据是指在触发通知按钮时在心率曲线中显示的数据。一旦触发,值显示将不相对于时间更改。
你好呀,
我通过这个主题解决了循环问题 -https://support.dialog-semicondiondiondum/timer-problem-again.。谢谢
你好呀,
I found out that @app_hrps.c. This req->meas_val.rr_intervals[0] in
void app_heart_rate_set_value(uint16_t heart_rate_val)
{
//分配消息
struct hrps_meas_send_req * req = ke_msg_alloc(hrps_meas_send_req,task_hrps,task_app,
hrps_meas_send_req);
// Fill in the parameter structure
req-> conhdl = app_env.conhdl;
// struct hrs_hr_meas meas_val;
/// 旗帜
req-> meas_val.flags = hrs_flag_hr_8bits_value;
/// RR-Interval numbers (max 4)
req-> meas_val.nb_rr_interval = 4;
/// RR-Intervals
//req-pymeas_val.rr_intervals[0] = heart_rate_val;
/// Heart Rate Measurement Value
req-> meas_val.heart_rate = heart_rate_val-104;
///能量消耗
req->meas_val.energy_expended = HRS_HR_CNTL_POINT_CODE;}
has no effect on the heart rate values. No matter what I change the value of rr_intervals[0], the values coming out from the heart rate profile is the same. Does this really has no effect? Thanks
你好呀,
我可以从心率概况中测量rr_intervals。我刚刚发现我的价值观在ECG或另一个单词中随着时间的推移电信号。从配置文件产生的内容目前不代表心率(BPM),而是随时间的电信号的值。任何想法,所以我可以获得Heart_rate的价值观吗?谢谢。
你好呀,
谢谢。我发现了。在此链接中您已经回答了这个问题https://support.dialog-semiconductor.com/forums/post/dialog-smartbond-bl...。