2017-05-16T01:29:47.377793+00:00 heroku[web.1]: State changed from starting to crashed
2017-05-16T02:50:58.455898+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=clockgui-8872.herokuapp.com request_id=e34d1d6d-4bf7-4758-9033-9db85edaf92e fwd="64.134.102.229" dyno= connect= service= status=503 bytes= protocol=https
2017-05-16T02:50:58.830851+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=clockgui-8872.herokuapp.com request_id=a8e444b7-55ad-4fe1-a788-dacde8c223b4 fwd="64.134.102.229" dyno= connect= service= status=503 bytes= protocol=https
2017-05-16T07:22:09.411510+00:00 heroku[web.1]: State changed from crashed to starting
2017-05-16T07:22:12.136731+00:00 heroku[web.1]: Starting process with command java -jar target/ClockGUI-0.0.1-SNAPSHOT.jar
2017-05-16T07:22:14.974069+00:00 app[web.1]: Setting JAVA_TOOL_OPTIONS defaults based on dyno size. Custom settings will override them.
2017-05-16T07:22:14.980202+00:00 app[web.1]: Picked up JAVA_TOOL_OPTIONS: -Xmx350m -Xss512k -Dfile.encoding=UTF-8
2017-05-16T07:22:15.093579+00:00 app[web.1]: no main manifest attribute, in target/ClockGUI-0.0.1-SNAPSHOT.jar
2017-05-16T07:22:15.188472+00:00 heroku[web.1]: Process exited with status 1
2017-05-16T07:22:15.200132+00:00 heroku[web.1]: State changed from starting to crashed
答案 0 :(得分:0)
停止scan_start取决于您使用此功能的位置。例如,如果你在main函数中使用scan_start(在for循环之前),一段时间后,如果没有连接,它将进入睡眠模式并停止扫描。
否则,如果要控制start_scanning时间,可以定义app_timer函数。例如,您可以定义一个计时器或按钮处理程序,在按下按钮时开始扫描。
如果你仍然找不到你想要的答案,还有另一个建议。您可以使用文件“ble_gap.h”中的stop_scanning函数来停止扫描。像这样的功能;
SVCALL(SD_BLE_GAP_SCAN_STOP, uint32_t, sd_ble_gap_scan_stop(void));
你可以这样使用;
(void) sd_ble_gap_scan_stop();
如果有任何错误,请更正。我希望这会有用......