Restart on double tap
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#include "imu.h"
|
||||
#include "zbus_channels.h"
|
||||
#include "mode.h"
|
||||
|
||||
#include <zephyr/kernel.h>
|
||||
#include <zephyr/device.h>
|
||||
@@ -97,6 +98,7 @@ static void debounce_cb(struct k_work *work)
|
||||
LOG_INF("Double tap");
|
||||
struct button_msg_t msg = { .button = IMU, .function = DOUBLE_TAP };
|
||||
zbus_chan_pub(&buttons_data_chan, &msg, K_NO_WAIT);
|
||||
mode_restart();
|
||||
}
|
||||
last_tap = k_uptime_get();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user