Commit 874643cb authored by Adam Wujek's avatar Adam Wujek

test_master: add read of UPTIME_SECS in print_log

Signed-off-by: 's avatarAdam Wujek <dev_public@wujek.eu>
parent 3e031d47
Pipeline #3876 passed with stage
in 1 minute and 50 seconds
......@@ -338,6 +338,7 @@ void print_log()
uint16_t powr[3];
uint16_t speed[3];
uint32_t tmr_err;
uint32_t uptime_secs;
int32_t res = 0;
uint8_t read_buf_long[32];
uint8_t read_buf_len;
......@@ -371,7 +372,14 @@ void print_log()
tmr_err = *((uint32_t *)read_buf_long);
if (!oneline)
check_res_print_error(res);
i2c_m_sync_blk_cmd_read(&I2C_0, ADDR_UPTIME_SECS, read_buf_long,
&read_buf_len);
uptime_secs = *((uint32_t *)read_buf_long);
if (!oneline)
check_res_print_error(res);
if (!oneline)
{
sprintf(sprintf_buf, "sample %lu\r\n", sample_no++);
......@@ -408,6 +416,10 @@ void print_log()
sprintf(sprintf_buf, "TMR_ERROR_CNT: %lu...\r\n", tmr_err);
cdcdf_acm_write((uint8_t*)sprintf_buf, strlen(sprintf_buf));
delay_ms(10);
sprintf(sprintf_buf, "UPTIME_SECS: %lu...\r\n", uptime_secs);
cdcdf_acm_write((uint8_t*)sprintf_buf, strlen(sprintf_buf));
delay_ms(10);
} else {
delay_ms(10);
sprintf(sprintf_buf, "%lu\t%d\t%lu\t%ld\t%.3f\t%.3f\t%.3f\t%.3f\t%.3f\t%.3f\t%.3f\t%.3f\t%.3f\t%.3f\t%.3f\t%.3f\r\n", sample_no++, mm_selected, tmr_err, res,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment