diff options
author | lonkaars <loek@pipeframe.xyz> | 2022-06-26 15:54:43 +0200 |
---|---|---|
committer | lonkaars <loek@pipeframe.xyz> | 2022-06-26 15:54:43 +0200 |
commit | 6c3d73d260a4254013e48b7f992c8c4fd87f5689 (patch) | |
tree | fa508a868e931d91eae06c140a8db64ca795953d /robot/sercomm.c | |
parent | c47518a99d8c8a49a8a97100bdff5b06cfa125ae (diff) |
fix object detection
Diffstat (limited to 'robot/sercomm.c')
-rw-r--r-- | robot/sercomm.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/robot/sercomm.c b/robot/sercomm.c index 195c477..a04d35f 100644 --- a/robot/sercomm.c +++ b/robot/sercomm.c @@ -154,11 +154,11 @@ void w2_cmd_info_rx(w2_s_bin *data) { W2_CREATE_MSG_BIN(w2_s_cmd_info_tx, res_msg, res_bin); res_msg->opcode = W2_CMD_INFO | W2_CMDDIR_TX; strncpy((char *)res_msg->build_str, W2_BUILD_STR, sizeof(res_msg->build_str)); - res_msg->errcatch_ms = (uint8_t)g_w2_hypervisor_ema_errcatch_ms; - res_msg->io_ms = (uint8_t)g_w2_hypervisor_ema_io_ms; - res_msg->sercomm_ms = (uint8_t)g_w2_hypervisor_ema_sercomm_ms; - res_msg->mode_ms = (uint8_t)g_w2_hypervisor_ema_mode_ms; - res_msg->uptime_s = w2_bin_hton32((uint32_t)(g_w2_hypervisor_uptime_ms / 1e3)); + res_msg->errcatch_ms = (uint8_t)g_w2_hypervisor_ema_errcatch_qs / 1e3; + res_msg->io_ms = (uint8_t)g_w2_hypervisor_ema_io_qs / 1e3; + res_msg->sercomm_ms = (uint8_t)g_w2_hypervisor_ema_sercomm_qs / 1e3; + res_msg->mode_ms = (uint8_t)g_w2_hypervisor_ema_mode_qs / 1e3; + res_msg->uptime_s = w2_bin_hton32((uint32_t)(g_w2_hypervisor_uptime_qs / 1e6)); res_msg->mode = g_w2_mode_history[g_w2_mode_history_index]; res_msg->battery_mv = w2_bin_hton16(read_battery_millivolts()); |