Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: log.cpp
- Revision:
- 11:2156cb77d0d6
- Parent:
- 10:e63fe4080760
- Child:
- 12:58ad06f9847d
--- a/log.cpp Fri Oct 04 09:46:00 2019 +0000 +++ b/log.cpp Fri Oct 04 09:58:51 2019 +0000 @@ -30,26 +30,34 @@ } if(b_LOG_flag && i_LOG_index_data < LOG_SIZE) { i_LOG_index_data ++; - rs_LOG_pc.printf("i_LOG_index_data:%d\r\n",i_LOG_index_data); + //rs_LOG_pc.printf("i_LOG_index_data:%d\r\n",i_LOG_index_data); } - + } +void log_stop() +{ + b_LOG_READY = true; + b_LOG_flag = false; + t_loggingTimer.stop(); + t_loggingTimer.reset(); +} + void log_pc() { rs_LOG_pc.printf("timestamp;left_90;right_90;left_45;right_45;pwm_dir;odom;speed;\r\n"); for(int i = 0; i<i_LOG_index_data; i++) { rs_LOG_pc.printf("%d;%f;%f;%f;%f;%d;%f;%f;\r\n",s_LOG_history[i].timestamp,s_LOG_history[i].left_90,s_LOG_history[i].right_90,s_LOG_history[i].left_45,s_LOG_history[i].right_45,s_LOG_history[i].pwm_dir,s_LOG_history[i].odom,s_LOG_history[i].speed); - - s_LOG_history[i].left_90 = 0.0; - s_LOG_history[i].right_90 = 0.0; - s_LOG_history[i].left_45 = 0.0; - s_LOG_history[i].right_45 = 0.0; - s_LOG_history[i].odom = 0.0; - s_LOG_history[i].speed = 0.0; - s_LOG_history[i].timestamp = 0; - s_LOG_history[i].pwm_dir = 0; - - + + s_LOG_history[i].left_90 = 0.0; + s_LOG_history[i].right_90 = 0.0; + s_LOG_history[i].left_45 = 0.0; + s_LOG_history[i].right_45 = 0.0; + s_LOG_history[i].odom = 0.0; + s_LOG_history[i].speed = 0.0; + s_LOG_history[i].timestamp = 0; + s_LOG_history[i].pwm_dir = 0; + + } i_LOG_index_data = 0; b_LOG_READY = false;