chore(pointing): Clean up some warning messages.

Properl check return code from queue-ing messages, and fix up some type
warnings in our logging calls.
This commit is contained in:
Peter Johanson 2025-10-28 17:02:23 -06:00
parent fa86b39aa8
commit d22bc0012a
2 changed files with 7 additions and 3 deletions

View File

@ -143,7 +143,7 @@ static float update_movement_1d(const struct behavior_input_two_axis_config *con
}
int64_t move_duration = ticks_since_start(state->start_time, now, config->delay_ms);
LOG_DBG("Calculated speed: %f", speed(config, code, state->speed, move_duration));
LOG_DBG("Calculated speed: %f", (double)speed(config, code, state->speed, move_duration));
move =
(move_duration > 0)
? (speed(config, code, state->speed, move_duration) * config->trigger_period_ms / 1000)

View File

@ -187,7 +187,7 @@ static int handle_keycode_state_changed(const struct device *dev, const zmk_even
return ret;
}
LOG_DBG("Setting last_tapped_timestamp to: %d", ev->timestamp);
LOG_DBG("Setting last_tapped_timestamp to: %lld", ev->timestamp);
data->state.last_tapped_timestamp = ev->timestamp;
ret = k_mutex_unlock(&data->lock);
@ -252,7 +252,11 @@ static int temp_layer_handle_event(const struct device *dev, struct input_event
struct layer_state_action action = {.layer = param1, .activate = true};
int ret = k_msgq_put(&temp_layer_action_msgq, &action, K_MSEC(10));
k_work_submit(&layer_action_work);
if (ret < 0) {
LOG_ERR("Failed to enqueue action to enable layer %d (%d)", param1, ret);
} else {
k_work_submit(&layer_action_work);
}
}
if (param2 > 0) {